sql server unique key for each partition

Viewed 55

I have a table that contain 3 columns:

ID int [primary key]

BranchRef int [foreign key]

Code int

I need to [Code] be unique in each [BranchRef]

like:

ID      BranchRef      Code
1           1            1
2           1            2
3           2            1
4           2            2
5           1            3

I really appreciate any help

1 Answers
Related