clear markdown compare help best fiddles feedback dbanow.uk
clear markdown donate comments/suggestions/bugs a leap of faith? bible365 diddy dollings
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 2805477 fiddles created (40815 in the last week).

create table p ( a int not null , b int , unique (a,b) );
 hidden batch(es)


create table c ( a int not null , b int , constraint fk_p foreign key (a,b) references p (a,b) on delete cascade on update cascade );
 hidden batch(es)


insert into p (a,b) values (1,null);
1 rows affected
 hidden batch(es)


insert into c (a,b) values (1,null), (2,null);
2 rows affected
 hidden batch(es)


delete from p;
1 rows affected
 hidden batch(es)


select * from c;
a b
1
2
 hidden batch(es)