Home > Oracle > How to Count Records of All Tables in Oracle Schema

How to Count Records of All Tables in Oracle Schema

SELECT  TABLE_NAME,
        TO_NUMBER(
            EXTRACTVALUE(
                XMLTYPE(
                    DBMS_XMLGEN.GETXML(
                        'SELECT COUNT(1) C FROM '||TABLE_NAME
                    )
                ), '/ROWSET/ROW/C'
            )
        ) RECORDS_COUNT
FROM    USER_TABLES;
Categories: Oracle Tags:
  1. No comments yet.
  1. No trackbacks yet.