How to find unique key in Sql Server?

Total Post:13

Points:91
 752  View(s)
Ratings:
Rate this:

I have 50 tables in a database. I want to fine unique key of all the tables. Is there query to know this or I have to check one by one by opening table structure.

If is it possible then please help me…

Thanks.. 

  1. Post:19

    Points:135
    Re: How to find unique key in Sql Server?

    There are many method I am telling you using system stored procedure

    At a time you can find unique key of single table for every table you have to run different stored procedure 

    EXEC sp_special_columns Students



    Here students is the table name


    when you execute this procedure it will give output 


      Modified On Apr-11-2018 11:23:58 PM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!