问题:
This question already has an answer here: 这个问题在这里已有答案:
I have multiple set of data to insert at once, say 4 rows. 我有一组数据要一次插入,比如4行。
My table has three columns: Person
, Id
and Office
. 我的表有三列: Person
, Id
和Office
。
INSERT INTO MyTable VALUES ("John", 123, "Lloyds Office");
INSERT INTO MyTable VALUES ("Jane", 124, "Lloyds Office");
INSERT INTO MyTable VALUES ("Billy", 125, "London Office");
INSERT INTO MyTable VALUES ("Miranda", 126, "Bristol Office");
Can I insert
all 4 rows in a single SQL statement
? 我可以在一个SQL statement
insert
所有4行吗?
解决方案:
参考一: https://stackoom.com/question/1toB/在单个SQL查询中插入多行-重复参考二: https://oldbug.net/q/1toB/Inserting-multiple-rows-in-a-single-SQL-query-duplicate
来源:oschina
链接:https://my.oschina.net/u/3797416/blog/4477492