Decode Your Destiny
Find out what your name and birth date say about you and GET YOUR FREE REPORT

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;

Add a Comment

Your email address will not be published. Required fields are marked *