Return

  • twin.devil

    SSC-Insane

    Points: 22208

    Comments posted to this topic are about the item Return

  • Koen Verbeeck

    SSC Guru

    Points: 258854

    Nice one, thanks.

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

  • Ron McCullough

    SSC Guru

    Points: 63877

    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]

  • kapil_kk

    SSC-Insane

    Points: 21316

    Easy one at start of the week 🙂

    Thanks

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

  • Lokesh Vij

    SSChampion

    Points: 10835

    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

  • sqlnaive

    SSCoach

    Points: 17435

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

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

  • sqlnaive

    SSCoach

    Points: 17435

    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. 🙂

  • Richard Warr

    SSCertifiable

    Points: 6955

    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

  • Rune Bivrin

    SSCertifiable

    Points: 7499

    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.

  • Nick Doyle

    SSC Eights!

    Points: 866

    Thanks, easy question 🙂

  • PRAMANA.DBA

    SSCertifiable

    Points: 5507

    +1 😎

  • aochss

    SSCommitted

    Points: 1677

    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

  • Nilima Mehtre

    Grasshopper

    Points: 22

    I am not getting why the answer is zero rows

  • Nick Doyle

    SSC Eights!

    Points: 866

    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.

  • Nilima Mehtre

    Grasshopper

    Points: 22

    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