List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:December 6 1999 6:31pm
Subject:Re: Unique Combinations?
View as plain text  
In the last episode (Dec 06), Bryan Gintz Work said:
> Is there a way to have unique combinations, so I would have 3
> columns: A, B and C And A, B and C do are not unique, but any
> combination of the three is unique, for example, if I have A=1, B=2,
> C=3 then there can be no other record that each of the columns has
> those exact values. I hope I asked this correctly, Thanks, Bryan
> Gintz

Add a unique key containing all three columns.

CREATE UNIQUE INDEX index1 ON table1 ( a, b, c );

-- 
	Dan Nelson
	dnelson@stripped
Thread
Unique Combinations?Bryan Gintz Work6 Dec
  • Re: Unique Combinations?Dan Nelson6 Dec