示例如下:

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下

 

相关文章:

  • 2021-11-20
  • 2021-11-20
  • 2021-06-10
  • 2022-03-14
  • 2021-10-07
  • 2021-08-21
  • 2021-11-20
猜你喜欢
  • 2022-01-04
  • 2021-11-20
  • 2022-01-06
  • 2021-11-18
  • 2021-11-11
  • 2022-12-23
相关资源
相似解决方案