In my TSQL table I added a constraint with the following sQL statement
alter table disabledqualities
add constraint uc_uIdQualCode
unique (userId, qualitycode)
I did it by hand because I just can't work out how the GUI is supposed to work.
You add a constraint and then you get a window where you should "define" your constraint. It's basically just a textbox. And no matter what I seem to enter, it never validates..
What am I supposed to enter in the box?
you would use new index not new constraint to add a unique constraint (read index) new constraint is to add check constraints
in the new index window check unique
Example, column must be between 0 and 1,
((0)<=[TABLE].[COLUMN] AND [TABLE].[COLUMN]<=(1))
When adding unique constraints, it's actually an index, like primary key, so you click on indexes/keys.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With