Sunday, 28 December 2014

Query to get count of all tables in a database/schema

Syntax:

select object_name table_name,to_number(
extractvalue(dbms_xmlgen.getxmltype('select count(*) cnt from ' || object_NAME),'/ROWSET/ROW/CNT')) NUM_ROWS
from all_objects where object_type='TABLE' and owner='&OWNERNAME' order by 1


No comments:

Post a Comment