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: why cant i do this?? any clues on how i should go about

Re: why cant i do this?? any clues on how i should go about

From: DA Morgan <damorgan_at_psoug.org>
Date: Tue, 08 Aug 2006 10:50:44 -0700
Message-ID: <1155059444.840637@bubbleator.drizzle.com>


Vinay Bhushan wrote:
> Thanks for the reply,
>
> but what do you propose me to do insted of using a Execute immidiate;
>
> i would like to create the col if not existing;
>
> how would i achive it.
>
> Regards
> Vinay
>
>> ALTER TABLE is a DDL statement. DDL statements need e
>> EXECUTE IMMEDIATE '<statement>'
>>
>> However, IMO, ALTERing a table in PL/SQL is a *VERY BAD IDEA*.
>>
>> --
>> Sybrand Bakker, Senior Oracle DBA

Propose first that you stop top posting.

Secondly propose that you NEVER alter tables using PL/SQL. That is a bad practice and that is what Sybrand cautioned you against.

However ... to perform DDL you need to use dynamic SQL either in the form of Native Dynamic SQL (NDS) or the DBMS_SQL or the DBMS_DDL built in packages. All of which are documented in Morgan's Library at www.psoug.org.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Tue Aug 08 2006 - 12:50:44 CDT

Original text of this message

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