How to use Unique Composite Key

前端 未结 3 1405
借酒劲吻你
借酒劲吻你 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 17:54

    ALTER TABLE Items ADD CONSTRAINT uc_name_size UNIQUE (ItemName,ItemSize)
    

    reference from oracle and postgres doc

提交回复
热议问题