Home  >  Article  >  Database  >  将mysql导入到csv的语句_MySQL

将mysql导入到csv的语句_MySQL

WBOY
WBOYOriginal
2016-06-01 13:38:44938browse

bitsCN.com


将mysql导入到csv的语句

 

将mysql导入到csv语句为:

     

load data infile 'C://Users//ankreran//Desktop//a.csv' 

into table test1  

fields terminated by ','  optionally enclosed by '"' escaped by '"' 

lines terminated by '/r/n';

 

如果报错误“AX/SA/FS”这种,则表示csv的编码格式不对,用Editplus

打开该csv文件,另存为utf8格式的,然后再导入。
 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn