Wednesday 11 March 2015

List of table having no Cluster Index in SQL

This script will show table without clustered index:

SELECT sys.tables.name, sys.indexes.name
FROM sys.tables left join sys.indexes
ON sys.tables.object_id = sys.indexes.object_id
WHERE isnull(sys.indexes.name,'')=''
ORDER BY sys.tables.name