Monday, March 18, 2013

Get row count of all tables from oracle schema


Share at Facebook

It is possible to get the total row count of all tables from a given schema using a single sql. Below one will work.


select table_name, to_number( extractvalue( xmltype( dbms_xmlgen.getxml('select count(*) c from '||table_name ) ) ,'/ROWSET/ROW/C' ) ) count from user_tables;


Hope this one helped you... :-)





No comments: