1、登入mysql,進入資料庫;
2、進入到對應的表裡面,輸入以下內容:
含有中文資料:
load data infile 'E:/qzkh.csv' into table dmpa_test character set gb2312 fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';
不含中文資料:
load data infile 'E:/qzkh.csv' into table dmpa_test fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n';
(注意:需要修改對應的路徑,表名,分割符)