测试把txt文件导入至mysql数据库中:table:txt文件:D:/data.txt(txt文件下载)txt中使用'\N'描测试把txt文件导入至mysql数据库中:
table:

txt文件:D:/data.txt (txt文件下载)
txt中使用 '\N' 描述null值。
导入数据:
load data local infile 'D:/data.txt' into table pet
lines terminated by '\r\n' ignore 1 lines;
应用mysql版本: