views:

109

answers:

2

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
+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