How to get list of tables in database having row count=0

SELECT '[' + SCHEMA_NAME(t.schema_id) + '].[' + + ']' AS fulltable_name, SCHEMA_NAME(t.schema_id) AS schema_name, AS table_name,
FROM sys.tables AS t INNER JOIN
sys.sysindexes AS i ON t.object_id = AND i.indid < 2
where rows=0
order by 1


Popular posts from this blog

List of special Characters in HTML

Get Random alphanumeric number with specific length using SQL Server