数据样本 103252765-|--|-stephanie_mt@hotmail.com-|-o/35+nGaNEU=-|-ion|-- 其中|为分隔符,每行的换行符\n mysql -uroot MariaDB [(none)]> use test; MariaDB [license]> load data local infile 'e:/export.sql' into table user fields terminated by '|' lines terminated by '\n
先介绍一个关键字的使用: delimiter 定好结束符为"$$",(定义的时候需要加上一个空格) 然后最后又定义为";", MYSQL的默认结束符为";" 如何通过mysql命令行批量插入100条数据呢,可以在代码里实现,也可以通过命令行,也就是通过存储过程: delimiter $$create procedure myproc ()begindeclare num int ;set num = 1 ;while num < 100 d