2021年4月21日星期三

Oracle Table Data Row Counter

 select
    table_name
    , to_number( 
        extractvalue( 
            xmltype( 
                dbms_xmlgen.getxml('select count(*) c from ' || table_name)
            ) 
            , '/ROWSET/ROW/C'
        )
    ) count 
from
    user_tables 
WHERE
    TABLE_NAME NOT LIKE 'BIN$%' 
    and (iot_type != 'IOT_OVERFLOW' or iot_type is null) 
order by
    table_name

没有评论: