Collections:
SP_HELP - Viewing Existing Indexes on an Given Table in SQL Server
How To View Existing Indexes on an Given Table using SP_HELP in SQL Server?
✍: FYIcenter.com
If you want to know how many indexes have been defined for a given table, you can use the SP_HELP built-in stored procedure in the following syntax:
EXEC SP_HELP table_name -- Returns all database objects related the given table
The tutorial exercise shows you how many indexes were defined from the previous tutorial on table "fyi_links":
EXEC SP_HELP fyi_links; GO ... index_name index_description index_keys ------------ ------------------------------- ---------- fyi_links_id nonclustered located on PRIMARY id fyi_links_url nonclustered located on PRIMARY url ...
2016-11-15, 676👍, 0💬
Popular Posts:
Where to find SQL Server database server tutorials? Here is a collection of tutorials, tips and FAQs...
How To Use DATEADD() Function in SQL Server Transact-SQL? DATEADD() is a very useful function for ma...
Where to find answers to frequently asked questions on Downloading and Installing SQL Server 2005 Ex...
What is mscorsvw.exe - Process - Microsoft .NET Framework NGEN in SQL Server? Process mscorsvw.exe i...
How to put statements into a statement block in SQL Server Transact-SQL? You can put statements into...