Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Help: Very simple PL/SQL question...

Help: Very simple PL/SQL question...

From: Araxes Tharsis <teclafp_at_hotmail.com>
Date: Sat, 26 May 2001 18:06:25 +0100
Message-ID: <9eoo2k$1mr$1@venus.telepac.pt>

Hi,
I need to create a PL/SQL procedure that accepts the name of a table and issues an SQL statement to that table. Something like

CREATE OR REPLACE PROCEDURE DeleteRecord (

     p_id NUMBER, p_table_name VARCHAR2
)
AS
BEGIN
 DELETE FROM p_table_name WHERE id = p_id;  COMMIT;
END;
/

How do I say that "p_table_name" is a variable and not the name of a table? Sorry for this simple question...,
Araxes Received on Sat May 26 2001 - 12:06:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US