I was looking for a way to find out in which table an index is in a MSSQL database. Finally, running this query in Microsoft SQL Server Management Studio did the trick:

/* Select table that has the index given by name */
SELECT t.name FROM sys.indexes o INNER JOIN sys.TABLES t
ON o.object_id=t.object_id
WHERE o.name='my_index'

 

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">

© 2011 Robert Sicoie Suffusion theme by Sayontan Sinha