October 12, 2017
how to find list of heap tables in the database.
Below query can be used to find heap table in sql server.
SELECT T.Name ‘HeaptableName’
FROM sys.indexes I
INNER JOIN sys.tables T
ON I.object_id = T.object_id
WHERE I.INDEX_ID = 0