Page 1 of 1
Copy Or Moving Database(TABLE'S) to Another Database. HOW?
Posted: Thu Feb 16, 2006 1:03 am
by khaki_monster
hello!
need some database advise or tips on how to exactly copy/ move('contents of') a 'Table' from one Database,
to another Database.
tanx in advanced!
cheerz!
Posted: Thu Feb 16, 2006 9:50 am
by pickle
Log in as root, then run a query like this:
Code: Select all
INSERT INTO newDatabase.newTable SELECT * FROM oldDatabase.oldTable
Posted: Thu Feb 16, 2006 11:21 pm
by khaki_monster
do i have to lock the database before copying or moving them?
cheerz!
Posted: Thu Feb 16, 2006 11:28 pm
by josh
No, depending on your setup it may be desired to lock it first however.
Posted: Wed Feb 22, 2006 9:33 pm
by khaki_monster
hi again..
questions are:
- what if('I TRIED') another sets of records added to oldDatabase and pass each values to the newDatabase using same statement.
Code: Select all
INSERT INTO newDatabase.newTable SELECT * FROM oldDatabase.oldTable
result, the newDatabase.newTable was not update with the new records. why?
- do i have to empties('TRUNCATE Table tablenme') those tables in newDatabase before inserting the data's?
- is their anyway to optimize('Fast/ speed'up') copying/ moving the data's to another database?
please help
cheerz!