存储过程
看错了。更新的话。你就将上述的testtable 变为临时表。然后再用 这个临时表关联更新
什么数据库?
查询汇总结果 是什么?sql查出来的一个值?
更新到一个字段,不就是 update 吗?
你意思是写一个循环插入?
先贴一个 sql server的
create table testtable(id int) go create procedure testp as ( select 1 union all select 2 ) go insert into dbo.testtable(id) exec testp select * from testtable
查询结果 id 1 2