TSQL
1 2 3 4 5 6 | --all tables and rowcount (in descending order by count) select '['+SCHEMA_NAME(t.[SCHEMA_ID])+'].['+t.NAME+']' AS [fulltable_name], SCHEMA_NAME(t.[SCHEMA_ID]) as [schema_name],t.NAME as [table_name] ,i.rows from sys.tables t INNER JOIN sysindexes i ON (t.object_id = i.id AND i.indid < 2) order by rows desc |
PLSQL
1 2 3 4 | select table_name, num_rows counter from dba_tables where owner = 'OWNER' order by table_name; |