sql - How can we check that table have index or not? -
how can check table have index or not ? if have how find index particular column table?
regards, kumar
in sql server management studio can navigate down tree table you're interested in , open indexes node. double clicking index in node open properties dialog show columns included in index.
if use t-sql, might help:
select sys.tables.name, sys.indexes.name, sys.columns.name sys.indexes inner join sys.tables on sys.tables.object_id = sys.indexes.object_id inner join sys.index_columns on sys.index_columns.index_id = sys.indexes.index_id , sys.index_columns.object_id = sys.tables.object_id inner join sys.columns on sys.columns.column_id = sys.index_columns.column_id , sys.columns.object_id = sys.tables.object_id sys.tables.name = 'table name here' order sys.tables.name, sys.indexes.name, sys.columns.name
Comments
Post a Comment