0

I am using Oracle SQL Developer. How do I write a SQL query to display all tables in the database and the name of the table, and number of rows?

Trendy Cloud
  • 11
  • 1
  • 3

1 Answers1

0

Try one of the following,

if you want to view all the tables that your account has access to,

  • select table_name, num_rows counter from all_tables

If you only want to view tables you own,

  • SELECT table_name, num_rows counter FROM user_tables

If you have access to the DBA_TABLES data dictionary view,

  • SELECT table_name, num_rows counter FROM dba_tables
Nadun Kulatunge
  • 1,567
  • 2
  • 20
  • 28