Please help me with a SQL query to understand the names of the tables , number of records in a table and size of the table ?
select * from dbc.tables;
--list of tables and associated other details across the database
select count(*) from databasename.tablename;
--gives the records for a table in a database.
select databasename,tablename,sum(currentperm) from dbc.tablesize group by 1,2
--gives the size of each table in each database