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 ...
⇒ sys.indexes - Viewing Existing Indexes on an Given Table in SQL Server
⇐ CREATE INDEX - Adding an Index on an Existing Table in SQL Server
2016-11-15, 1556🔥, 0💬
Popular Posts:
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can u...
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying...
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a ...
What is sqlservr.exe - Process - SQL Server (SQLEX?PRESS) in SQL Server? Process sqlservr.exe is the...
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension...