List:General Discussion« Previous MessageNext Message »
From:Gabriel PREDA Date:May 5 2006 8:27pm
Subject:Re: How to rename a DB
View as plain text  
I think the correct way... as planned for the 5.1 release is as follows:

-- ---------- Start renaming database named "old_db" into "new_db"
CREATE DATABASE new_db;

ALTER TABLE old_db.table_1 RENAME new_db.table1;
ALTER TABLE old_db.table_2 RENAME new_db.table2;
................................................................................
 ALTER TABLE old_db.table_N RENAME new_db.tableN;

DROP DATABASE old_db;
-- ---------- End renaming database


-- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Gabriel PREDA
Senior Web Developer

Thread
How to rename a DBHardi OK5 May
  • Re: How to rename a DBPeter Brawley5 May
  • Re: How to rename a DBGabriel PREDA5 May
RE: How to rename a DBGeorge Law5 May
  • Re: How to rename a DBAdrian Bruce5 May
RE: How to rename a DBGeorge Law5 May