Hi all,
There is a table having a one-to-many relation to itself :
create table structure
(
struct\_code varchar2(15) not null,
str\_struct\_code varchar2(15),
niv\_struct\_code varchar2(5),
struct\_lib varchar2(255),
constraint pk\_structure primary key (struct\_code),
constraint fk\_structur\_associati\_structur foreign key (str\_struct\_code)
references structure (struct\_code)
);
Here are sample data :

So how to delete all rows from this table starting from the rows which have no child records till the top rows which have no parent rows ?