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. 2591531 fiddles created (45746 in the last week).

create table category ( id int primary key, name text, parentId int ); create table product ( id int primary key, name text, categoryId int references category(id) ); insert into category values (1, 'rootCategory', null), (2, 'child1', 1), (3, 'child2', 2); insert into product values (1, 'productOne', 1), (2, 'productTwo', 2), (3, 'productOne', 2), (4, 'productOne', 3);
3 rows affected
4 rows affected
 hidden batch(es)