Table Variable

  • Sreepathi1987

    Default port

    Points: 1425

    Comments posted to this topic are about the item Table Variable

  • Ron McCullough

    SSC Guru

    Points: 63877

    Nice question - make sure one knows the basics


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


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

  • Lokesh Vij


    Points: 10836

    Good Question to refresh our basics 🙂

    ~ Lokesh Vij

    Guidelines for quicker answers on T-SQL question[/url]
    Guidelines for answers on Performance questions

    Link to my Blog Post -->[/url]

    Follow me @Twitter

  • Koen Verbeeck

    SSC Guru

    Points: 258965

    Great question, thanks.

    Need an answer? No, you need a question
    My blog at
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • DugyC

    Hall of Fame

    Points: 3804

    At first glance my instinct was to go with zero, but then I noticed it was a table variable.

    Phew 😀

    Good question, thanks.

    [font="Comic Sans MS"]"The difficult tasks we do immediately, the impossible takes a little longer"[/font]

  • Divine Flame


    Points: 15941

    Nice question. Thanks!

    Sujeet Singh

  • Michael Riemer


    Points: 5136

    DugyC (9/4/2012)

    At first glance my instinct was to go with zero, but then I noticed it was a table variable.

    Phew 😀

    Good question, thanks.


    Knew the issue with Table Variable, so nearly went with two! Then I noticed the Try Catch... And thought about the error.

    Good thing I waited for my cup of coffee first!:-D

    Thanks for the great question

  • This was removed by the editor as SPAM

  • Toreador


    Points: 11257

    Easy question - if only I'd noticed that it was a table variable!

  • cmnayal


    Points: 21

    Nice question...I got it right 😉

    For them those who got it wrong....

    " Table variable is out of scope from Transactions "...

  • Raghavendra Mudugal


    Points: 10658

    Awesome, good question, thank you. 🙂

    ww; Raghu
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • Vinay Kumar


    Points: 6098

    nice question.

    i have blindly answered and got it wrong.

    Vinay Kumar
    Keep Learning - Keep Growing !!!

  • Ola L Martins-329921

    Mr or Mrs. 500

    Points: 542

    Didn't know about the table-variable... 🙁

    I saw that. And I knew there was a catch - but failed to draw the correct conclusion...

    Nice Q and Good To Know...

  • TomThomson

    SSC Guru

    Points: 104773

    Terrific question.

    Nicely illustrates what might be thought of as a nasty problem with table variables, but can sometimes be a big plus point.


  • Dana Medley


    Points: 6764

    Thank you for the terrific question. I must say it almost bit me this morning until I took a second look. Zombie mode almost had me this morning, but then I noticed it was a table variable.

    Everything is awesome!

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

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