sql server - T-SQL - Keep inserted rows in Temp table - after a rollback -
i want run updates on hard table within transaction, , insert rows temp table based on newly updated hard table, don't want lose temp table after transaction rolled back...is possible?
i sense there obvious reply here, , i'm not seeing it.
thanks laurence!!
you can utilize table variable, don't participate in rollback. --laurence
this test prove it:
declare @test table (test int) begin tran insert @test select 1 rollback select * @test
worked perfect. thanks! expand on this
sql sql-server table transactions rollback
No comments:
Post a Comment