List all tables in a database and their row count

select ‘select ”’+Table_Schema +’.’+ Table_name + ”’ as TableName, count(1) as Row_Count from ‘+Table_Schema +’.’+ Table_name
from INFORMATION_SCHEMA.TABLES

Leave a Reply