insert into tree(id,name,pid) select '101','test','10' from dual where not exists(select 1 from tree where id='101');
or
insert when (not exists (select 1 from tree where id='101')) then into tree(id,name,pid) select '101','test','10' from dual;