select * into #student1 from student
select * from #student1
create table #temp2( id int not null,name nvarchar(50))
--drop table #temp2
CREATE TABLE #tempCodes (PromotionsCode VARCHAR(50),CustomerId int)
delete from #student1 output deleted.id, deleted.id into #temp2 where id=1
select * from #temp2