I have the following three tables:
Form ----------- formId INTEGER PK name NVARCHAR(50) NOT NULL Block ----------- blockId INTEGER PK name NVARCHAR(30) NOT NULL orderInForm INTEGER NOT NULL FormBlock ----------- blockId INTEGER PK formId INTEGER PK
There is a many-to-many relationship. A block could appear on multiples forms.
orderInForm is for a particular form.
Block table I want to avoid that two blocks have the same
orderInForm in a
I think I have to add an UNIQUE constraint, but if
orderInForm is on
Block table, I don't know how to do it.
May I need to move