How to find the Index fields of table in SQL Server

Below is the query on finding the Index fields of the table

Returns Primary key

  1. select * from sys.objects where parent_object_id = object_id(N'TABLE_1')

Returns All

  1. SELECT * FROM SYS.index_columns   where object_id= object_id(N'TABLE_1')

, ,

  1. No comments yet.
(will not be published)
Submit Comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Subscribe to comments feed
  1. No trackbacks yet.

SetPageWidth