Sunday, 11 September 2016

Query to Get the Count of All tables in a SQL Server Database



select 'select count(*) C,'+''''+table_name+''' from '+TABLE_SCHEMA+'.'+Table_name+ ' union all'  from INFORMATION_SCHEMA.tables 


No comments:

Post a Comment