CREATE TABLE [dbo].[t3] (
[n1] [int] not null,
[n2] [int] not null,
[n3] as n1 + n2 ,
[n4] as n1 * n2
CONSTRAINT [t3_unique_key] unique (n3,n4)
)
Create 2 computed columns n3,n4 as shown below. declare unique key constraint on it.
That shd detect the following scenario.
Regards,
Raj