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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL and bind variables

Re: PL and bind variables

From: Chrysalis <cellis_at_iol.ie>
Date: 1997/02/26
Message-ID: <33146CFB.7A05@iol.ie>#1/1

Eduardo Rene Rodriguez Avila wrote:
>
> I was wondering if is could be posible assign a table or column name to
> a variable and use that variable in a SQL statement within PL/SQL code.
>

I hope the Oracle representative misunderstood your question! Table names and column names *cannot* be dynamically assigned through bind variables in PL/SQL. However, it is possible in PL/SQL to use the DBMS_SQL package
to prepare and execute a dynamically-constructed SQL statement in which table names and/or column names are included as part of the statement.

(Note that in SQL*Plus, table names and variable names can be entered as substitution variables (e.g. &table_name), but this is because these are substituted by SQL*Plus *before* the statement is submitted to the parser)

Hope this helps.

Chrysalis. Received on Wed Feb 26 1997 - 00:00:00 CST

Original text of this message

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