How should I do this (business logic) in Sql Server? A constraint?
- by Pure.Krome
Hi folks,
I wish to add some type of business logic constraint to a table, but not sure how / where.
I have a table with the following fields.
ID INTEGER IDENTITY
HubId INTEGER
CategoryId INTEGER
IsFeatured BIT
Foo NVARCHAR(200)
etc.
So what i wish is that you can only have one featured thingy, per articleId + hubId.
eg.
1, 1, 1, 1, 'blah' …