很简单,在原来的基础上前面加个begin,后面加个end;这样多条语句就可以串联执行了,恩。
begin
insert into testtable (id, temp)values (1, '1111111111');
insert into testtable (id, temp)values (2, '1111111111');
insert into testtable (id, temp)values (3, '1111111111');
commit;
end;
本文介绍了一种在SQL中批量插入数据的方法,并通过事务保证数据的一致性和完整性。具体操作是在原有SQL语句的基础上,使用begin和end包裹多条插入语句,并在最后使用commit提交更改。
1万+

被折叠的 条评论
为什么被折叠?



