sql server - 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 feel there obvious answer here, , i'm not seeing it.

thanks laurence!!

you can use 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


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -