Home  >  Article  >  Database  >  mysql load data 设置导入数据编码

mysql load data 设置导入数据编码

WBOY
WBOYOriginal
2016-06-07 17:50:541616browse

LOAD DATA INFILE语句从一个文本文件中以很高的速度读入一个表中。如果指定LOCAL关键词,从客户主机读文件。如果LOCAL没指定,文件必须位于服务器上

LOAD DATA INFILE 'E://temp//data.txt' IGNORE
INTO TABLE cell_definition_test
CHARACTER SET gbk
FIELDS TERMINATED BY ','
LINES TERMINATED BY 'n' (cgi,msc_id,title,shape_type,lon,lat,radius,angle)

如果要指定编码 加上 CHARACTER SET gbk

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