如何将大型sql插入拆分为多个插入

时间:2015-05-28 09:58:05

标签: mysql

我有一个大的sql插入查询,其中多个插入符号由下面的逗号分隔。

INSERT INTO `table1` VALUES (396,3,90,'collar','admin','2015-05-27 10:10:52','2015-05-27 10:10:52',0),(397,3,90,'across shoulder','admin','2015-05-27 10:10:52','2015-05-27 10:10:52',0);

如何将这个大型sql插件拆分成多个插件?

有些事情是这样的:

INSERT INTO `table1` VALUES(396,3,90,'collar','admin','2015-05-27 10:10:52','2015-05-27 10:10:52',0);
INSERT INTO `table1` VALUES (397,3,90,'across shoulder','admin','2015-05-27 10:10:52','2015-05-27 10:10:52',0);

1 个答案:

答案 0 :(得分:0)

有两个选项是avaialble。(这只是替代品)

1) Create CSV file of Inputs and import it into table by using Workbench.

2) I will suggest you alternative to this use Mysql WorkBench for insert values.