
June 4th, 2005, 08:24 AM
|
|
Contributing User
|
|
Join Date: Nov 2004
Location: Töölö
|
|
|
Rename table / foreign keys
Cheers!
During development of a software, I run in to urge to rename a table, and creating a view to retrieve data for that table. And I'd like to mention, that I'm not that much familiar with Oracle (or DBA stuff anyways). What kinds of problems I might run to? And perhaps my main point: what happens to foreign key -relations? Do I need to alter each and every one of them, or doest the system automatically update them? If it doesn't, could I do all this in one query, like:
Code:
ALTER TABLE X RENAME TO Y; CREATE VIEW X AS SELECT * FROM Y WHERE FUNKY_CONDITION; COMMIT;
Thanks for ideas,
jussi the Hangover-Worker
|