By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table t (x int not null, y int, unique(x,y));
insert into t (x) values (1);
1 rows affected
insert into t (x) values (1);
Msg 2627 Level 14 State 1 Line 1
Violation of UNIQUE KEY constraint 'UQ__t__486D187ACFBB7DE7'. Cannot insert duplicate key in object 'dbo.t'. The duplicate key value is (1, <NULL>).
Msg 3621 Level 0 State 0 Line 1
The statement has been terminated.