Page 1 of 1
move table to different database
Posted: Mon Aug 16, 2004 1:06 pm
by neophyte
In my mysql server, Table 'links' is in Database 'polls' I need to move table 'links' to database 'website' in the same mysql server. Does anyone know how to do this?
Thanks
Posted: Mon Aug 16, 2004 1:11 pm
by markl999
1. Create the new table (links) in database website with the same structure as the links table in polls.
2. INSERT INTO website.links SELECT * FROM polls.links;
3. DROP TABLE polls.links; //this does the move rather than just a copy
I'll give it a try
Posted: Mon Aug 16, 2004 1:43 pm
by neophyte
Thanks, I'll give it a try