Table record count based on schema name
The following query will list all the tables belongs to schema1 and schema2 along with their record count information. Create a table RECCNT before running the following query.
select ' INSERT INTO RECCNT select '''+ s.name+ '.' + o.name + ''', count(*) from ' + s.name+ '.' + o.name from sys.objects O INNER JOIN sys.schemas S ON O.schema_id = S.schema_id where type = 'u' and s.name in ('SCHEMA1','SCHEMA2' ) Order by s.name GO select * from RECCNT
Find all Table record count based on its schema name was last modified: October 1st, 2017 by