示例如下:
load data infile 'test.csv'
into table `test`
fields terminated by ',' optionally enclosed by '"' escaped by '"'
lines terminated by '\n';
说明:
首先必须创建相应的表,如:‘test’
window下:
test.csv必须写全路径
linux下:
必须将test.csv放在你要导入的数据库下:
如【使用test数据库】:放在/var/lib/mysql/test下