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: rename a table/view

Re: rename a table/view

From: Karsten Farell <kfarrell_at_medimpact.com>
Date: Fri, 27 Sep 2002 16:25:09 GMT
Message-ID: <FD%k9.258$Se5.14921856@newssvr13.news.prodigy.com>


You are quite welcome. However, do read what Richard Foote posted. I might have read too much into your question and offered you the more complicated solution. ;)

Erin Gu wrote:

> Thanks Karsten,
> as you can tell, I am pretty new in the Oracle world!
> Erin
> 
> "Karsten Farell" <kfarrell_at_medimpact.com> wrote in message
> news:CaLk9.3209$B51.85314729_at_newssvr21.news.prodigy.com...
> 

>>If you have *not* implemented integrity constraints (Primary Key /
>>Foreign Key), it's a snap:
>>
>>create temp_table as select * from orig_table;
>>drop table orig_table;
>>alter table temp_table rename to orig_table;
>>
>>Recreate any indexes on orig_table.
>>
>>If you *have* implemented integrity constraints, you have your work cut
>>out for you. You can disable them on any tables "related" to your
>>orig_table, then follow the above, then enable them again. But only you
>>know the parent-child relationships among your tables. You'll have to
>>research that.
>>
>>Erin Gu wrote:
>>
>>>Hi,
>>>what I am trying to accomplish is change table/view name without impact
>>
> on
> 

>>>data stored already. Any suggestions?
>>>
>>>Thanks in advance!
>>>
>>>Erin
>>>
>>

>
> Received on Fri Sep 27 2002 - 11:25:09 CDT

Original text of this message

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