1.查询表名 :
SELECT TABLE_NAME FROM user_all_tables ;
2.组装统计SQL 语句:
1 >SELECT ‘Select ‘‘ ‘|| TABLE_NAME || ‘ ‘‘ as tableName, count(*) from ’ || TABLE_NAME || ‘ ; ‘ as exectuteSQL FROM user_all_tables ;
2> SELECT ‘Select ‘‘ ‘|| TABLE_NAME || ‘ ‘‘ as tableName, count(*) from ’ || TABLE_NAME || ‘ union ‘ as exectuteSQL FROM user_all_tables ;
3.复制组装好的exectuteSQL 执行
select * from ( 第二步2> 执行的结果复制到这里 删除最后一个 union ) 执行
4.看查询结果 。
时间: 2024-11-08 23:30:24