Re: change table name
Date: 12 Dec 2001 07:42:49 -0800
Message-ID: <9v7ttp02jkn_at_drn.newsguy.com>
In article <a322a4d66598dbf77c34f721975cdee6.50058_at_mygate.mailgate.org>,
"Jean-baptiste says...
>
>How can we modify table name physically.
>
>Is the following request enough?
>
> UPDATE USER_OBJECTS
> SET OBJECT_NAME = 'NEW_TABLE_NAME'
> FROM USER_OBJECTS owing
> WHERE OBJECT_NAME = 'OLD_TABLE_NAME';
>
> COMMIT;
>
> ALTER SYSTEM FLUSH SHARED POOL;
>
first, the update will never work -- thats a view, a complex one at that. You NEVER update the data dictionary -- NEVER NEVER.
Even if you found the base SYS. tables to update -- you would NEVER do that. never.
to rename a table
rename old_table_name to new_table_name;
>
>Last question: What does the last line mean?
>
it flushes the shared pool, where cached, parsed statements are kept. It is rarely if ever needed.
>Regards before any help.
>
>Jean-Baptiste
>
>
>--
>Posted from mix-dijon-117-2-185.abo.wanadoo.fr [80.9.65.185]
>via Mailgate.ORG Server - http://www.Mailgate.ORG
-- Thomas Kyte (tkyte_at_us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Wed Dec 12 2001 - 16:42:49 CET
