Coba gunakan kueri ini:
select * from table
where id not in (select id_parent from table);
Berikut ini contohnya:http://sqlfiddle.com/#!2/7de26/1
Coba gunakan kueri ini:
select * from table
where id not in (select id_parent from table);
Berikut ini contohnya:http://sqlfiddle.com/#!2/7de26/1