Hi, could you help?
I have never written procedures in PL/SQL and I do not know how to do it:
I need to write a PL/SQL procedure that will be called for a set of values (for example X) and will end depending on the final condition.
Something like that:
An input set of values: X = (1,2,3,4,5)
CREATE PROCEDURE DELETE_VALUES.
BEGIN
Steps in procedure:
1. COUNT (*) FROM Table_1 WHERE index IN X - (A)
2. COUNT (*) FROM Table_2 WHERE index IN X - (B)
3. DELETE from Table_1 WHERE index IN X - (C)
4. DELETE from Table_2 WHERE index IN X - (D)
5. IF (A) = (C) AND (B) = (D) COMMIT (if not then ROLLBACK)
Could u please help me?
Thank you in advance