How do I make a composite key with SQL Server Management Studio?

前端 未结 7 1575
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 05:25

How do I make a composite key with SQL Server Management Studio?

I want two INT columns to form the identity (unique) for a table

7条回答
  •  孤独总比滥情好
    2020-11-28 05:45

    enter image description here

    1. Open the design table tab
    2. Highlight your two INT fields (Ctrl/Shift+click on the grey blocks in the very first column)
    3. Right click -> Set primary key

提交回复
热议问题