Blog Pages

Find tables without clustered index

SELECT o.name 
FROM sys.objects o
LEFT JOIN sys.indexes i ON o.object_id = i.object_id AND i.type_desc = 'CLUSTERED'
WHERE o.type='U'
AND i.type_desc IS NULL

No comments:

Post a Comment