T-SQL to Find all tables without any Index

Its worst practice always not to have any index on database. Based on requirement the table should contain necessary Indexes to make data retrieval faster.

Below is the script which will give you all tables which are not having any Index defined on it.

select [name] as [Table_Name] from sys.objects
Where type = 'U' and [name] not in
(SELECT OBJECT_NAME(i.object_id)
 FROM sys.indexes AS i
 INNER JOIN sys.index_columns AS ic
 ON i.OBJECT_ID = ic.OBJECT_ID
 AND i.index_id = ic.index_id
 INNER JOIN sys.objects as so
 on i.OBJECT_ID = so.OBJECT_ID
 WHERE so.type = 'U' )