Oracle: SQL to count record in all tables

If you want to know the record in all the tables from your database, can simply use this SQL command.

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

Credit to https://community.oracle.com/thread/927598

Popular posts from this blog

Microsoft Word: Make picture background to be transparent

LINE: Change the contact name

Microsoft Visio: How to set default font