Category Archives for SQL Server

Record count of all tables in sql server

This query will take a second to get the rows count from all table. I feel must create a view of this query.   SELECT ‘[' + SCHEMA_NAME(t.schema_id) + '].[' + t.name + ']‘ AS fulltable_name , SCHEMA_NAME(t.schema_id) AS schema_name , t.name AS tablename ,i.rows As DataCount FROM sys.tables AS t INNER JOIN sys.sysindexes AS i ON t.object_id = i.id … Continue reading

28. December 2011 by Farhan Alam
Categories: Data Access Class, SQL Server | Leave a comment