Created
July 18, 2019 20:56
-
-
Save greeno/aa4c069e43317c772a2a902684415c32 to your computer and use it in GitHub Desktop.
This query returns list of tables in a database with their number of rows.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select tab.table_schema, | |
tab.table_name, | |
tinf.tbl_rows as rows | |
from svv_tables tab | |
join svv_table_info tinf | |
on tab.table_schema = tinf.schema | |
and tab.table_name = tinf.table | |
where tab.table_type = 'BASE TABLE' | |
and tab.table_schema in('src_canvas') | |
and tinf.tbl_rows > 1 | |
order by tinf.tbl_rows desc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment