Return

  • Comments posted to this topic are about the item Return

  • Nice one, thanks.

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

  • Koen Verbeeck (8/18/2013)


    Nice one, thanks.

    +1

    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]

  • Easy one at start of the week 🙂

    Thanks

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

  • kapil_kk (8/18/2013)


    Easy one at start of the week 🙂

    Thanks

    +1 🙂

    ~ Lokesh Vij


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

    Link to my Blog Post --> www.SQLPathy.com[/url]

    Follow me @Twitter

  • Ohh Gosh... Caught in the trap. Not a good start for the week. :sick:

    It was just another "be on your toes" QOTD. 🙂

  • Ohh Gosh... Caught in the trap. :sick: Not a good start to the week for me.

    It was one of those "on your toes" QOTD. 🙂

  • I knew the RETURN would kick in with a value of 1 so decided that that was one row returned :crazy:

    _____________________________________________________________________
    MCSA SQL Server 2012

  • Got it. But to be precise there won't even be a result set. Not even one with zero rows.


    Just because you're right doesn't mean everybody else is wrong.

  • Thanks, easy question 🙂

  • +1 😎

  • Good QotD...As usual, it seems the best way to learn new items is to take a little quiz on them. I learned a couple of new things today..just not related to the point of the question.

    First, I thought it was going to throw a syntax error on this statement, but it is valid. I guess it will once you add a new column to the table, it will give you some grief.

    INSERT INTO @TABLE

    SELECT @a

    Second, I have used compound operators in C#, but not in SQL.

    http://msdn.microsoft.com/en-us/library/cc645922.aspx

    Anton

  • I am not getting why the answer is zero rows

  • M07 (8/19/2013)


    I am not getting why the answer is zero rows

    The select from the table variable is at the end of the procedure, but the procedure is exited at the return statement. The select is never executed. Hope this helps.

  • thanks its helpful

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

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