Table
name |
---|
Sam |
Bush |
.... |
Jone |
mysql > select * from test_table where name LIKE "good" INTO OUTFILE "/tmp/export.csv" fields terminated by ',';
After you execute the above code, you mat get export.csv at your tmp directory. On the contrary, you may import from csv file.
mysql > load DATA LOCAL INFILE "/tmp/export.csv" INTO TABLE test_table fields terminated by "," LINES TERMINATED BY "\r\n";
No comments:
Post a Comment