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?
Asked
Active
Viewed 6,558 times
0
-
If you have access, try looking at this table: dba_tables – jose_bacoy Mar 07 '18 at 16:26
-
the title is too long and description is too short! – sia Mar 07 '18 at 16:29
1 Answers
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