Oracle統計某個使用者下所有表的各自行數
set serveroutput on
declare
t_count number(10);
t_str VARCHAR2(500);
cursor t_tables is select table_name from user_tables;
begin
for t_row in t_tables loop
t_str := 'select count(*) from '|| t_row.table_name;
execute immediate t_str into t_count;
dbms_output.put_line( t_row.table_name || '=' || to_char(t_count));
end loop;
end;
declare
t_count number(10);
t_str VARCHAR2(500);
cursor t_tables is select table_name from user_tables;
begin
for t_row in t_tables loop
t_str := 'select count(*) from '|| t_row.table_name;
execute immediate t_str into t_count;
dbms_output.put_line( t_row.table_name || '=' || to_char(t_count));
end loop;
end;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29135257/viewspace-2152680/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle 匯出某個使用者下的表Oracle
- oracle實用sql(12)--查詢資料是否在某個使用者下各個表的各個列OracleSQL
- oracle統計表的所有行數(原創)Oracle
- kill某個使用者的所有程式
- mysql下批量清空某個庫下的所有表(庫不要刪除,保留空庫)MySql
- 刪除一個使用者下的所有表指令碼指令碼
- 如何查詢某個資料表中除某個欄位的所有資訊???
- ORACLE刪除當前使用者下所有的表的方法Oracle
- oracle 查詢所有表的行數Oracle
- 批量的遷移一個資料庫上某使用者所有表的同義詞資料庫
- Oracle查詢當前使用者和當前使用者下的所有表Oracle
- Linux查詢某個目錄下每個子目錄的所有檔案數量Linux
- Linux統計某資料夾下檔案、資料夾的個數Linux
- Oracle限制某個使用者的連線數及PROFILE介紹Oracle
- Oracle 真的有引數可以 1s 統計完 200G使用者下的所有物件麼?Oracle物件
- 統計字串中某個字元出現的次數字串字元
- Oracle中檢視某個表的建立時間 - [Oracle]Oracle
- oracle中檢視某個表的索引是否有效Oracle索引
- 將一個使用者下所有表的查詢許可權賦給另一個使用者
- Oracle授權A使用者查詢B使用者的所有表Oracle
- Greenplum訪問某個模式的某個表模式
- oracle10g exp可否用一個使用者匯出另一個使用者的某表呢?Oracle
- 獲取裝置上的某個目錄下的所有檔案
- MySQL查詢某個列中相同值的數量統計MySql
- 利用HashMap統計字串各個字元出現的次數HashMap字串字元
- 如何實現一個功能,將oracle中一個使用者下的所有表結構匯出到.sql檔案中OracleSQL
- 題目7:統計字串中的各種字元的個數字串字元
- Oracle 的各種表Oracle
- 統計一個字串中的單詞的個數,並列印各個單詞字串
- python 統計字串裡某個字元出現的次數count()Python字串字元
- SQL Server中各個系統表的作用SQLServer
- oracle 查詢所有表的表名Oracle
- sqlserver查詢一個庫所有表的記錄數SQLServer
- Java 輸出某路徑下的所有檔案Java
- 刪除一個使用者下所有的物件物件
- ORACLE 10G以上 在同一資料庫中複製使用者下的所有表Oracle 10g資料庫
- 求Matlab矩陣中各個不同元素或者某個元素出現的次數Matlab矩陣
- Elasticsearch 統計某欄位有值的文件數Elasticsearch