List of all Tables without Indexes in SQL


How to get the list of all tables that are not having any indexes on them :
Today, I got a question on this and decided to put the way here also. 

SELECT [name] AS Tables_Without_Indexes
FROM sys.tables
WHERE OBJECTPROPERTY(OBJECT_ID,'IsIndexed') = 0
ORDER BY 1;

The above statement will give the tables that are not having any indexes as :
Untitled.png 

Thanks for reading :)


Share on Google Plus

About Unknown

0 comments :

Post a Comment