create table dbo.test1 (id int,name varchar(10))
create table dbo.test2 (id int)
insert into dbo.test1 values(1,'a')
insert into dbo.test1 values(2,'b')
select * from dbo.test1
select * from dbo.test2
update dbo.test1 set name = 'c'
output inserted.id into dbo.test2
where id = 1