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

Add a Comment

Your email address will not be published. Required fields are marked *