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/SQL Help

Re: PL/SQL Help

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Thu, 20 Jan 2000 11:59:18 -0500
Message-ID: <ljfe8ssevnbuhdqtk2g3iqc3i0paur0f6v@4ax.com>


A copy of this was sent to "Tom Deseamus" <tdeseamus_at_digital-hire.com> (if that email address didn't require changing) On Thu, 20 Jan 2000 10:10:06 -0800, you wrote:

>Thanks, I'm running 8i. I've tried execute_immediate('CREATE TABLE
>STORERANK1(ENAME VARCHAR2(25),RANKNO NUMBER(5));'); but that won't complie
>either. Can you help on the syntax or point me to a help file (I have
>looked).
>

plsql manual documents dynamic sql in plsql with 8i

it would be:
ops$tkyte_at_8i> ops$tkyte_at_8i>
ops$tkyte_at_8i> begin
  2 execute immediate 'create table t ( x int )';   3 end;
  4 /

PL/SQL procedure successfully completed.

if you get insufficient privs, see
http://osi.oracle.com/~tkyte/Misc/RolesAndProcedures.html for why and what to do

>Thanks,
>Tom
>
>"Sybrand Bakker" <postmaster_at_sybrandb.demon.nl> wrote in message
>news:948382100.8871.0.pluto.d4ee154e_at_news.demon.nl...
>> DDL is only supported through using the dbms_sql package (v7) or
>> execute_immediate (v8)
>>
>> Hth,
>>
>> --
>> Sybrand Bakker, Oracle DBA
>> Tom Deseamus <tdeseamus_at_digital-hire.com> wrote in message
>> news:JIFh4.502$Xs.11727_at_news4.mia...
>> > How come I cannot run this in a PL/SQL procedure
>> >
>> > CREATE TABLE STORERANK(ENAME VARCHAR2(25),RANKNO NUMBER(5));
>> >
>> > The compiler has a problem with the CREATE word.
>> >
>> > Thanks,
>> >
>> >
>>
>>
>

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Thu Jan 20 2000 - 10:59:18 CST

Original text of this message

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