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

Home -> Community -> Usenet -> c.d.o.server -> Re: Determine if a column exists...

Re: Determine if a column exists...

From: Steve Howard <stevedhoward_at_gmail.com>
Date: 7 Jul 2006 06:47:12 -0700
Message-ID: <1152280032.841453.137530@k73g2000cwa.googlegroups.com>

Anthony wrote:
> I believe this will fail in general as the rename statement will fail
> if the column does not exist. I guess you the solution is to check if
> column exists then construct a dynamic sql statement and then rename
> it.

...or in a loop, wrap each execute immediate in a begin end block for all tables. However you decide to do it, check for INVALID objects when the run completes, as some objects could be "broken" if you forgot about something that used the column.

Regards,

Steve Received on Fri Jul 07 2006 - 08:47:12 CDT

Original text of this message

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