Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help on PL/SQL
Biao Cheng (Sam) wrote:
>
> Hi,
>
> I have a question to ask:
>
> I need to create a stored procedure which contains a string
> type parameter, say
>
> CREATE OR REPLACE proc_1(fieldname CHAR)
> ....
>
> Now, suppose the actual parameter I am passing is a field
> name in a table, my question is How I am able to run a
> SQL statement, something like this:
>
> SELECT "fieldname" from table1;
>
> Is there any way to do this? Any input is highly appreciated.
You can use dynamic SQL. The package used is DBMS_SQL
--- Name : Lun Wing San (Certified Oracle Database Administrator) Title : Oracle Database Administrator and System Administrator of QRC Phone : (852)27885841 This posting represents the personal opinions of the author. It is not the official opinion or policy of the author's employer. Warranty expired when you opened this article and I will not be responsible for its contents or use.Received on Sun Mar 23 1997 - 00:00:00 CST
![]() |
![]() |