Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: Renaming a column in 8i Personal version
You fail to specify what version of Oracle you are using, but, generally, you
cannot rename a column...
Since the table is empty try this:
when connected as OwnerC:
rename TableB to TableB_Old;
create TableB as select ColumnA NewColumnName,* from TableB_Old;
"Julius Siojo" <siojo_at_ejward.com> wrote:
>How are you all doing? I was just wondering how you change a column name
>from an empty database. ColumnA is in TableB and is owned by OwnerC. I
>tried to issue a "rename column" sql command that I've used in Informix but
>I can't seem to make it work. If I issue the command:
>
> rename column OwnerC.TableB.ColumnA to NewColumn;
>
>it gives me an error saying ORA-00903-invalid table name . I've used
>different combinations of owners/table/column commands but to no avail. If
>I use a select command on the same OwnerC.TableB.ColumnA combination, it
>works fine. Is renaming a column not allowed in Oracle? Thanks a lot in
>advance.
>
>Julius Siojo
>Oracle Newbie
>
>
>
Received on Thu Jun 07 2001 - 11:12:03 CDT
![]() |
![]() |