Oracle Recordcount of all user tables

From WickyWiki
Revision as of 07:26, 5 July 2013 by Admin (talk | contribs) (3 revisions)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

We are using an XML function here to get it all in one statement.

SELECT table_name, 
       to_number(extractvalue
             (xmltype
       (dbms_xmlgen.getxml
    ('select count(*) c from '||table_name)),'/ROWSET/ROW/C')) nbr_lines
	FROM user_tables 
	ORDER BY 1;