Answers

Question and Answer:

  Home  MS SQL Server

⟩ How To View Existing Indexes on an Given Table using SP_HELP?

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 "ggl_links":

EXEC SP_HELP ggl_links;

GO

...

index_name index_description index_keys

------------ ------------------------------- ----------

ggl_links_id nonclustered located on PRIMARY id

ggl_links_url nonclustered located on PRIMARY url

...

 120 views

More Questions for you: