If I have the name of an index, what query can I use to find what table the index belongs to?
+3
A:
SELECT OBJECT_NAME(object_id) FROM sys.indexes WHERE name = '...'
Lukasz Lysik
2009-09-11 19:08:44
+1
A:
try this:
Select object_Name(Id) IndexName,
object_name(parent_Obj) Tablename
From SysObjects
Where Type In ('K', 'F')
order By object_name(parent_Obj),
object_Name(Id)
Charles Bretana
2009-09-11 19:11:43