By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
1 rows affected
Msg 2601 Level 14 State 1 Line 2
Cannot insert duplicate key row in object 'dbo.relations' with unique index 'unq_relations_id1_id2'. The duplicate key value is (1, 2).
Msg 3621 Level 0 State 0 Line 2
The statement has been terminated.
Msg 2601 Level 14 State 1 Line 2
Cannot insert duplicate key row in object 'dbo.relations' with unique index 'unq_relations_id1_id2'. The duplicate key value is (1, 2).
Msg 3621 Level 0 State 0 Line 2
The statement has been terminated.
id1 | id2 | least_id1_id2 | greatest_id1_id2 |
---|---|---|---|
1 | 2 | 1 | 2 |