USE AdventureWorks ----Replace AdventureWorks with your DBName
GO
SELECT DISTINCT [TABLE] = OBJECT_NAME(OBJECT_ID)
FROM SYS.INDEXES
WHERE INDEX_ID = 0
AND OBJECTPROPERTY(OBJECT_ID,'IsUserTable') = 1
ORDER BY [TABLE]
GO
Monday, December 5, 2011
2005 Find Table without Clustered Index – Find Table with no Primary Key
Labels:
System Stored Procedure
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment