Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Ensure unicity of triple values

Author  Topic 

vermorel
Starting Member

26 Posts

Posted - 2006-02-15 : 06:39:08
I have a table with several fields. I would like to ensure that that each triple combination from the three first fields is unique.

In other words, instead of ensuring unicity based on a single field, I would like to ensure unicity on a triple of fields (equality being defined as a field-wise equality for each one of the three fields).

How can I achieve that?

Thanks in advance,
Joannes

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-02-15 : 06:41:21
Make use of Composite primary keys. Refer khtan's reply from this topic
http://sqlteam.com/forums/topic.asp?TOPIC_ID=61702

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -