Find what table a specific index belongs to Find what table a specific index belongs to sql-server sql-server

Find what table a specific index belongs to


SELECT OBJECT_NAME(object_id) FROM sys.indexes WHERE name = '...'


try this:

Select object_Name(Id) IndexName,  object_name(parent_Obj) TablenameFrom SysObjectsWhere Type In ('K', 'F')order By object_name(parent_Obj),          object_Name(Id)


I used a slightly different approach than Lukasz since my index wasn't of type k or f.

Select object_Name(Id) IndexName,object_name(parent_Obj) TablenameFrom SysObjectswhere object_name(id) like 'MyIndexName'order By object_name(parent_Obj),          object_Name(Id)