load data infile
‘C:\\Users\\Administrator\\Desktop\\import\\CELLutf.csv’ into
table cell character set gbk(设置gbk字符编码,制止出现汉语乱码)
fields terminated by ‘,’
enclosed by ‘”‘
lines terminated by ‘\r\n’
IGNORE 1 LINES;

csv表中包罗粤语字符,具体完结代码示例:

IGNORE 1 LINES:忽略csv表头。

lines terminated by ”:指行终止符;

代码解释:

4503.com,田野先生s terminated by
‘,’:csv文件中多少里面的分隔符,csv文件默许以逗号分隔;

enclosed by ”:提出封套符;