What happens to a variable after COMMIT or ROLLBACK

  • T.Ashish

    SSCarpal Tunnel

    Points: 4243

    Comments posted to this topic are about the item What happens to a variable after COMMIT or ROLLBACK

  • Dscheypie

    Default port

    Points: 1484

    Nice idea, this question!

    SQL Server writes only changed data pages, not variables. That concept in mind forbids any other answer, doesn't it?

    ________________________________________________________
    If you set out to do something, something else must be done first.

  • Ron McCullough

    SSC Guru

    Points: 63877

    A very back to basics question ...... Thanks

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • mickyT

    SSChampion

    Points: 10360

    good question

  • Koen Verbeeck

    SSC Guru

    Points: 258941

    Very nice question, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • kapil_kk

    SSC-Insane

    Points: 21316

    bitbucket-25253 (10/5/2013)


    A very back to basics question ...... Thanks

    +1 🙂

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • Mr. Kapsicum

    SSCertifiable

    Points: 6128

    Nice and Easy Question to start the week.

    🙂

  • PRAMANA.DBA

    SSCertifiable

    Points: 5507

    Mr. Kapsicum (10/6/2013)


    Nice and Easy Question to start the week.

    🙂

    +2

  • Carlo Romagnano

    SSC-Insane

    Points: 21793

    Too much easy!

    Thanks for TWO free points.

  • Hany Helmy

    SSChampion

    Points: 13321

    Carlo Romagnano (10/7/2013)


    Too much easy!

    Thanks for TWO free points.

    +2

  • Jamsheer

    Ten Centuries

    Points: 1136

    PRR.DB (10/6/2013)


    Mr. Kapsicum (10/6/2013)


    Nice and Easy Question to start the week.

    🙂

    +2

    +3 🙂

  • ksatpute123

    Hall of Fame

    Points: 3325

    Easy one. Thanks.

  • This was removed by the editor as SPAM

  • SQLDoubleG

    Hall of Fame

    Points: 3090

    Thanks for the question!

    It might be good also to point that table variables are not affected either by transaction rollbacks.

    As per BOL

    Because table variables have limited scope and are not part of the persistent database, they are not affected by transaction rollbacks.

    http://technet.microsoft.com/en-us/library/ms175010.aspx

    Cheers

  • logitestus

    SSCrazy

    Points: 2817

    Thank you for this morning's brain warm-up.

Viewing 15 posts - 1 through 15 (of 23 total)

You must be logged in to reply to this topic. Login to reply