SQL Server SP_HELPINDEX - updated version that includes column names
Here is the incentive for the SQL Server users (this new year), you may be aware then using SP_HELPINDEX or SP_HELP could give some part of information on the indexes and database objects. But to know more about depedant columns you need to query INFORMATION_SCHEMA views or sys.index_columns.
Kalen Delaney aka 'SQL Queen' has blogged a wonderful script to get more information for 'included columns' :
The issue is SQL Server 2005 "Included Columns". There was a post on the public newsgroups about them a couple of days ago, and just yesterday, there was a similar post on the SQL Server MVP private newsgroup. Simply put, the questions were expressing concern that there were no built-in tools in SQL Server 2005 to list which columns were included columns. The information is of course available in the metadata views, but it can require a join of at least three of them to get a simple list of which columns are "included columns" in a given index. The poster on the MVP newsgroup wanted to know if someone had already written such a query and could share it, to save him some work.
Read this Geek City: Included Columns blog for more information on this facility.
**__________________________________**
SQL Server MVP, Sr. DBA & industry expert.
-
Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.