mysql导入导出CSV
Posted 从此重新定义啦
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql导入导出CSV相关的知识,希望对你有一定的参考价值。
mysql导出csv: select * from test_info into outfile \'/tmp/test.csv\' fields terminated by \',\' ------字段间以,号分隔 optionally enclosed by \'"\' ------字段用"号括起 escaped by \'"\' ------字段中使用的转义符为" lines terminated by \'\\r\\n\'; ------行以\\r\\n结束 mysql导入csv: load data infile \'/tmp/test.csv\' into table test_info fields terminated by \',\' optionally enclosed by \'"\' escaped by \'"\' lines terminated by \'\\r\\n\';
以上是关于mysql导入导出CSV的主要内容,如果未能解决你的问题,请参考以下文章