Tuesday, February 2, 2016

Tables that do not have an index

--How To find all the tables that do not have an index

SELECT SCHEMA_NAME(schema_id) AS schema_name
    ,name AS table_name
FROM sys.tables
WHERE OBJECTPROPERTY(object_id,'IsIndexed') = 0
ORDER BY schema_name, table_name;


GO

No comments:

Post a Comment