当前位置:网站首页>Collection of common SQL statements
Collection of common SQL statements
2022-04-23 17:11:00 【ZHZHK001】
Query the current user : Number of rows in all tables
Apply to :oracle
select t.table_name,t.num_rows from user_tables t ORDER BY num_rows DESC ,table_name
If the above sql No queries , Run the above sentence again after executing the following script 【 I can run it directly 】
create or replace function count_rows(table_name in varchar2, owner in varchar2 default null) return number authid current_user IS num_rows number; stmt varchar2(2000); begin if owner is null then stmt := 'select count(*) from "' || table_name || '"'; else stmt := 'select count(*) from "' || owner || '"."' || table_name || '"'; end if; execute immediate stmt into num_rows; return num_rows; end;
Reference resources :https://www.cnblogs.com/luxd/p/6141476.html
版权声明
本文为[ZHZHK001]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230553251565.html
边栏推荐
- . net cross platform principle (Part I)
- oracle 中快速获取表的列名列表
- AIOT产业技术全景结构-数字化架构设计(8)
- An essay on the classical "tear down the wall in thinking"
- VLAN高级技术,VLAN聚合,超级Super VLAN ,Sub VLAN
- freeCodeCamp----shape_ Calculator exercise
- VLAN advanced technology, VLAN aggregation, super VLAN, sub VLAN
- 【WPF绑定3】 ListView基础绑定和数据模板绑定
- Aiot industrial technology panoramic structure - Digital Architecture Design (8)
- Paging the list collection
猜你喜欢
Detailed explanation of C webpai route
ASP. NET CORE3. 1. Solution to login failure after identity registers users
Lock锁
Grpc gateway based on Ocelot
Scope and scope chain in JS
.Net Core3. 1 use razorengine NETCORE production entity generator (MVC web version)
Milvus 2.0 détails du système d'assurance de la qualité
Understanding of RPC core concepts
TypeError: set_ figure_ params() got an unexpected keyword argument ‘figsize‘
Customize my_ Strcpy and library strcpy [analog implementation of string related functions]
随机推荐
Generate random numbers with high quality and Gaussian distribution
Nacos + aspnetcore + Ocelot actual combat code
[registration] tf54: engineer growth map and excellent R & D organization building
JS to find the character that appears three times in the string
Get the column name list of the table quickly in Oracle
Solution architect's small bag - 5 types of architecture diagrams
C# Task. Delay and thread The difference between sleep
SPC introduction
Aiot industrial technology panoramic structure - Digital Architecture Design (8)
Use of shell cut command
How vscode compares the similarities and differences between two files
PostgreSQL column storage and row storage
STM32__ 03 - beginner timer
Promise (III)
Nodejs installation and environment configuration
Use between nodejs modules
C dapper basically uses addition, deletion, modification and query transactions, etc
On lambda powertools typescript
Node access to Alipay open platform sandbox to achieve payment function
Smart doc + Torna generate interface document