1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Oracle Stored Procedure

Discussion in 'General' started by nishapd, Oct 28, 2009.

  1. nishapd

    nishapd Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Can anyone please help/guide me how write a 3 parameter Stored Procedure to delete rows from multiple tables ?

    I was trying to write it as follow. Can anyone please correct me If I am wrong?

    CREATE OR REPLACE PROCEDURE SP(parameter1 VARCHAR2, parameter2 VARCHAR2, parameter3 VARCHAR2)
    IS
    BEGIN
    delete from table1 where id = parameter1;

    delete from table2 where id = parameter2;

    delete from table3 where id = parameter1;

    delete from table4 where id = parameter3;

    END;
     
  2. rajavu

    rajavu Forum Guru

    Messages:
    815
    Likes Received:
    52
    Trophy Points:
    610
    Location:
    @ Bangalore , India
    This seems to be an old post .. anyway..

    It looks OK. Did you get any error ?
     
  3. nishapd

    nishapd Active Member

    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    80
    Thanks for asking but yes, I resolved it...