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

mysql load data 设置导入数据编码

WBOY
Release: 2016-06-07 17:50:54
Original
1658 people have browsed it

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template