أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
Tables.
One way is :
using SELECT INTO OUTFILE to put data in test.csv file :
SELECT * INTO OUTFILE 'test.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\\n' FROM <table name>Then Insert to new table :
LOAD DATA INFILE 'test.csv' INTO TABLE <tablename> FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\\n' (column1,column2,column3)
1. Use Import or export method
OR
2. Create table with same structure(design). Let say new table name is "table2" and first one from where you want to transfer is "table1". then use this query
insert into table2 select *from table1
Use this query
By using a VIEW we can move the data from ne table to another table that is data migration
INSERT INTO `db`.`table_to`
SELECT *
FROM `db`.`table_from` ;
Create table with same structure(design). Let say new table name is "table2" and first one from where you want to transfer is "table1". then use this query
insert into table2 select *from table1