Tuesday, January 20, 2015

[Oracle] How to get raw counts of all tables at once


SQL Query : 

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