Re: Dynamic SQL

From: <michael_ort_at_my-deja.com>
Date: Fri, 07 Apr 2000 17:31:43 GMT
Message-ID: <8cl61u$2uh$1_at_nnrp1.deja.com>


If you're running 8.1.5 you can use native dynamic SQL. It's faster and easier to use, with some minor limitations compared to the DBMS_SQL package that don't impact your example. You can find it in the Oracle documentation and it's only about 10 pages of reading...

Example:
declare
begin

  • one-liner execute_immediate 'DROP TABLE tablename'; -- OR --
  • using bind variable execute_immediate 'DROP TABLE :tablename' using tablename; end;

Simple enough?
Michael J. Ort

In article <38EB7980.D3636A99_at_lvvwd.com>,   Kyriakos Lambros <kyriakos.lambros_at_lvvwd.com> wrote:
> Does anyone know where I can find good
documentation on dynamic SQL?
> Specifically I am trying to create and drop a
table via a pl/sql block.
>
> Thanks,
>
> Kyriakos Lambros
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Fri Apr 07 2000 - 19:31:43 CEST

Original text of this message