How to use Unique Composite Key

Posted by LifeH2O on Stack Overflow See other posts from Stack Overflow or by LifeH2O
Published on 2011-01-15T10:37:21Z Indexed on 2011/01/15 10:53 UTC
Read the original article Hit count: 217

Filed under:
|

I have a table

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

I was making composite key of (ItemName,ItemSize) to uniquely identify item. And now after reading some answers on stackoverflow suggesting the use of UNIQUE i revised it as

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

But How to apply UNIQUE constraint on ItemName and ItemSize

please correct if there is something wrong in question

© Stack Overflow or respective owner

Related posts about database

Related posts about database-design