Discussion in 'General Developer Questions' started by jumbo, Oct 3, 2005.
I want to define 2 unique coloumns in my table.Is this is possible with sql server
Is this you wanted?
Create table yourTable(u1 int unique, u2 int unique)
Failing to plan is Planning to fail
I wonder why you want this [<img src='/community/emoticons/emotion-1.gif' alt='' />]<br /><br />Madhivanan<br /><br />Failing to plan is Planning to fail
Yes, two unique keys are only "necessary" when you need your own unique key, and you are assuming that an external key is also unique.
Never trust outside keys to be unique.
And if the second key is also an internal unique key then I wish you good luck, because there must be some organizational mess-up.
Separate names with a comma.