-1
当我想最后得到插入ID为表我用这样的:获取列出所有最后插入的ID的一个表
insert into table1(col1,col2,col3)
values(val1,val2,val3)
declare @last_id int = scope_identity()
该得到的值现在我已经存储过程中插入多个项目:
insert into table1(col1,col2,col3)
select @val1,@val2,val3 from table2 where [email protected] //@value is a single value that is passed to procedure as argument
现在我怎么能得到这些多行添加到table1的ID列表?