Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to rename a table?
Of course you could use the specified procedure by using
RENAME old_table TO new_table;
Then you don't need to care about FKs, etc
Regards
Dante
In article <OctnYeJq#GA.205_at_cpmsnbbsa02>,
"Brian Peasland" <peasland_at_email.msn.com> wrote:
>
> Gennady wrote in message <374da284$0$2597_at_fountain.mindlink.net>...
> >Hello,
> >How can I rename existing table?
>
> To rename table X, try this:
>
> create table tempX as select * from X;
> drop table X;
> create table X as select * from tempX;
>
> This will work unless there are foreign keys to X.
>
> Hope that helps,
> Brian Peasland
> peasland_at_msn.com
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri May 28 1999 - 04:13:54 CDT
![]() |
![]() |