Groups | Blog | Home
all groups > sql server programming > september 2006 >

sql server programming : How to list all indexs from a table?


Aaron Bertrand [SQL Server MVP]
9/3/2006 2:01:49 PM
Well, for starters, table_name is not the first parameter. But I think
you're looking for sp_helpindex:

EXEC sp_helpindex @objname = N'myTable';



[quoted text, click to view]

Hari Prasad
9/3/2006 2:16:00 PM
Hi,

You could use any of the below commands:-

sp_help <tablename> -- This will provide you constrains related to the
table as well

sp_helpindex <tableName>

Apart from that you could query SYSINDEXES table.


Thanks
Hari
SQL Server MVP

[quoted text, click to view]

Andreas Klemt
9/3/2006 7:54:14 PM
Hello,

how can I list all indexs from a table?
sp_indexes myTable
does not work.
Error message: Could not find server 'myTable' in sysservers. Execute
sp_addlinkedserver to add the server to sysservers.

Thanks for any help in advance!

Regards
Andreas Klemt

Andreas Klemt
9/3/2006 8:51:51 PM
Hallo Aaron,

thanks for your help!

Kind Regards
Andreas Klemt

"Aaron Bertrand [SQL Server MVP]" <ten.xoc@dnartreb.noraa> schrieb im
Newsbeitrag news:OkiOmL4zGHA.4392@TK2MSFTNGP04.phx.gbl...
[quoted text, click to view]

AddThis Social Bookmark Button