PDA

View Full Version : How to copy one table from one db to another?


JJR512
07-08-2002, 05:41 PM
Is it possible to copy a table from one database to another? How can I dump out the data/structure of one table from one database, and import it into another. If this is possible, please tell me the exact mysql syntax to use for each step through telnet. Thanks! :)

Admin
07-08-2002, 05:50 PM
http://www.mysql.com/doc/C/R/CREATE_TABLE.html

CREATE TABLE newDBname.newTblName (
rows...
) SELECT fields FROM oldDBname.oldTblName;