How can you find tables without indexes?

In order to find all the tables without indexes just run the following query in the Query Editor:


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 for reading this post,
Next steps :

  1. Share this with your colleagues because Sharingis Learning
  2. Comment below if you need any assistance

Powered by CodeReview – Let’s make it Better!