Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: insert into table , where the table name is a parameter
In article <6af31984.0206062226.10454d6c_at_posting.google.com>, tsachis_at_boi.gov.il
says...
>
>Hi
>I want to write a procedure that insert into table which its name is pass
>to the procedure as a parameter
>i.e
>procedute temp(tab varchr2) is
>begin
>insert into temp values(etc...)
>ofcourse that the tab name erresent a table which has the appropiate coloums
>please help me
>p.s
>what is IN parameter
execute immediate 'insert into ' || tab || ' values ( :bv1, :bv2, :bv3, ... )' USING variable1, variable2, variable3, .....;
An in parameter -- that is a paremeter passed to your procedure that can only be read by your procedure -- it is supplied as an INPUT -- not OUTPUT variable. You cannot modify the value.
-- Thomas Kyte (tkyte@oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Fri Jun 07 2002 - 07:28:35 CDT