find tables without Indexes

Hi All,

The following code is used to find the Table Names and Schema name without Indexes of the table.


USE <database_name>
GO
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


Thanks & Regards,
Sarav.


Comments

No responses found. Be the first to comment...


  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: