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: How to rename a table?

Re: How to rename a table?

From: Dante <dnotari_at_my-deja.com>
Date: Fri, 28 May 1999 09:13:54 GMT
Message-ID: <7ilmoh$7ab$1@nnrp1.deja.com>


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

Original text of this message

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