Transaction

  • dammm!, i got it wrong.

    Thanks
    Vinay Kumar
    -----------------------------------------------------------------
    Keep Learning - Keep Growing !!!

  • I executed the query myself and it returned 1 row with the value of 1, so I guess the answer is wrong!;-)

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

  • A very good question - thanks 🙂

    I would submit that this a good reason to use try/catch so you can control what will happen. Also not to knock their knowledge where appropriate, but given the posts here, I wonder how many of the 50+% that got it right did a copy/paste job 🙂 Either way, lesson learned I guess.

  • Good question

  • oops bad one!! got the wrong answer

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

  • When I reun the query Select * from test. I got the 2 rows in result while in poll reuslt it mentioned that Query will return 0 rows.

    Worng post in question poll :cool::w00t:

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

  • kapil190588 (10/5/2012)


    When I reun the query Select * from test. I got the 2 rows in result while in poll reuslt it mentioned that Query will return 0 rows.

    Worng post in question poll :cool::w00t:

    I just tried the code fromm the question, and I got 0 rows, as expected. Did you use copy/paste to copy and execute the code? Or did you type it yourself? In the latter case, you may have made a typo.

    Otherwise, the only explanations I can think of are non-standard settings on your computer (though I have no idea what settings would lead to two rows being returned), or some corruption or a bug on your system.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

Viewing 7 posts - 31 through 36 (of 36 total)

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