Copying tables on mysql
Here is a snippet to copy tables (possibly from one database to another):
ipk is a schema, ipk_v2 as another schema. Here I'm trying to copy a table called "tclrequest" from ipk to ipk_v2
You'll need to delete the temp table when you are done.
ipk is a schema, ipk_v2 as another schema. Here I'm trying to copy a table called "tclrequest" from ipk to ipk_v2
USE ipk_v2;CREATE TABLE `table11` LIKE `ipk`.`tclrequest`; -- A temp table
INSERT INTO tclrequest SELECT * FROM ipk.tclrequest;
You'll need to delete the temp table when you are done.
Comments
Post a Comment