How to use Unique Composite Key

前端 未结 3 1399
借酒劲吻你
借酒劲吻你 2021-01-05 17:46

I have a table

Item(ItemName*, ItemSize*, Price, Notes)

I was making composite key of (ItemName,ItemSize) to uniquely identify item. And

3条回答
  •  长发绾君心
    2021-01-05 18:08

    ALTER TABLE Items ADD UNIQUE INDEX(ItemName, ItemSize);
    

    and here's an article explaining how to achieve the same using SQL Server Management Studio.

提交回复
热议问题