LOAD DATA infile 'e:/qy/order.csv'
INTO TABLE mc_order
fields terminated BY ','
enclosed BY '"'
lines terminated BY '\n'
IGNORE 1 ROWS (staff_no,
order_no,
client_no,
take_name,
remarks,
tel,
order_status,
express_name,
express_no,
address,
amount,
buy_datetime
)
load data infile "filepath" :从指定文件中载入数据
into table table_name :指定将数据插入到指定表中
fields terminated by ',' :列之间使用分隔符来分割
enclosed by '"' :字符串使用 " 进线包裹
lines terminated by '\n' :行记录结束标记
ignore 1 rows; :忽略第一行