INSERT TB SELECT TOP 30 * FROM TA UPDATE TB SET A=A+1
create proc pr_test as begin select top 30 * into # from a insert into b select * from # update a set a = a+1 where exists(select 1 from # where #.a = a.a and #.b = a.b) drop table # end go
iNSERT TB SELECT TOP 30 a+1,b FROM TA???
create proc pr_test as begin select top 30 * into # from a insert into b select * from # update a set a = a+1 where exists(select 1 from # where #.a = a.a and #.b = a.b) drop table # end go
UPDATE TB SET A=A+1
as
begin
select top 30 * into # from a
insert into b select * from #
update a
set a = a+1
where exists(select 1 from # where #.a = a.a and #.b = a.b)
drop table #
end
go
iNSERT TB SELECT TOP 30 a+1,b FROM TA???
create proc pr_test
as
begin
select top 30 * into # from a
insert into b select * from #
update a
set a = a+1
where exists(select 1 from # where #.a = a.a and #.b = a.b)
drop table #
end
go