日期:2014-05-16 浏览次数:20495 次
declare @tb(@col1 int,@col2 int)
insert into tb(col1,col2) output inserted.col1 ,inserted.col2 into @tb select col1,col2 from tb2
select * from @tb
create table t(a int,b varchar(10))
go
insert into t output inserted.*
select 1,'a' union all
select 2,'b'
/*
a b
1 a
2 b
*/