I want to write a procedure to perform a delete for the following
i want to delete from x_table and y_table where id=select id from z_table where obj_id="1234" also at the same time i want to delete
from user_table id = select id from z_table where obj_id="1234" and user_id != in (select user id from main_table)
in short i want to delete the rows from 3 tables x_table,y_table and user_table for the given obj_id and for user_table i want to alsocheck if user_id is not in other main_table
Try this proc. Please not that this is a notepad certified version 🙂 I havent compiled it on Oracle as I dont have it on my personal machine. See if it works..