Showing UNIQUE KEY on SSMS 2012 Diagram

Unanswered Showing UNIQUE KEY on SSMS 2012 Diagram

All Replies

  • Wednesday, February 27, 2013 9:37 AM
     
      Has Code

    Hi

    This should give you all the information requested.

    SELECT * 
    FROM   INFORMATION_SCHEMA.TABLE_CONSTRAINTS Tab
        , INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE Col
    WHERE  Col.Constraint_Name=Tab.Constraint_Name
          AND Col.Table_Name=Tab.Table_Name
          AND Constraint_Type<>'UNIQUE'
          AND Col.Table_Name='Table name'


    Hope this helps

    edit: oops just realised you meant in the diagrams...
    • Edited by Rui Travassos Wednesday, February 27, 2013 9:37 AM
    •