Find tables without Indexes

Run following query
USE <your_database_name>; 
GO
SELECT SCHEMA_NAME(schema_id) AS schema_name,name AS tbl_name
FROM sys.tables
WHERE OBJECTPROPERTY(OBJECT_ID,'IsIndexed') = 0
ORDER BY schema_name, tbl_name;
GO

No comments:

Post a Comment

PostgreSQL-Query: Sort result set by specific field values using ORDER BY Clause

Problem: Suppose we have a book_inventory table which has some columns such as id, isbn, title, author, publisher, publish_date, etc.. whe...