Thursday, January 31, 2013


-- Get Row count for all the tables in a schema or with any where condition.

select owner, table_name, TO_NUMBER(extractvalue(XMLTYPE(dbms_xmlgen.getxml('select count(*) c from ' || owner || '.' || table_name)),'/ROWSET/ROW/C')) ROW_COUNT from dba_tables where owner ='DV2SCH2' ORDER BY 1,2;

No comments: