Oracle统计用户所有表的行数
DECLARE CURSOR c1 is select table_name from user_tables; V_TABLE_NAME user_tables.TABLE_NAME%TYPE; V_CNT number; V_SQL varchar2(2000); BEGIN FOR V_TABLE_NAME in c1 loop V_SQL := 'select count(1) from ' || V_TABLE_NAME.table_name; execute immediate V_SQL into V_CNT; dbms_output.put_line( V_TABLE_NAME.table_name || ',' || V_CNT); end loop; end;
网页名称:Oracle统计用户所有表的行数
分享URL:http://azwzsj.com/article/jiijss.html