sql query analyzer and table keys/indexes

  • HI. Is there a way in sql query analyzer to be able to see what fields makeup the primary keys and indexes in a table and also is there a way to see if a field has the IDENTITY attribute turned on? I know you can see the primary keys under the tables in the CONSTRAINT folder and the indexes under the INDEXES folder but i didn't see where it actually showed what made up that constraint or index.

    Thanks Juanita

  • I use sp_help to obtain much of what I need to know about a table. Such as all its columns, Identity columns, RowGuid columns, Index names and keys, and Constraints.

    Use: sp_help <Object_Name>

    e.g. USE pubs

    EXEC sp_help publishers

    Dave Owen

    Teligence Communications Inc.

    Vancouver, BC Canada

  • Thank you so much..that will work great!

    Juanita

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply