Hi,
I have a table item_master. it has child tables item_cost and item_sell.
I want to perform deletion on item_master table, to do this i have to first delete records from child tables.
so instead of deleting from the child tables manually can i make item_master table as on delete cascade to ensure oracle automatically delete the records from child tables.
or i should write delete statementes for child tables? which one is faster?
begin
delete from item_sell where item_id in (select item_id from item_master where expire_time>sysdate-1);
delete from item_ where item_id in (select item_id from item_master where expire_time>sysdate-1);
delete from item_master where expire_time>sysdate-1;
commit;
end;
/
Thanks,
Vinod