Basic of T-SQL

  • Comments posted to this topic are about the item Basic of T-SQL

    Best,
    Naseer Ahmad
    SQL Server DBA

  • Got it right because I guessed what the op was getting at but I think the question should have been proof-read and tidied up before publication.

    ...One of the symptoms of an approaching nervous breakdown is the belief that ones work is terribly important.... Bertrand Russell

  • Easiest question of all times..thanks for an easy 1 point 🙂

    ~ 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

  • Now the question was a good question on the basics, I am NOT disputing that !

    [rant]

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

    From the above reference (bolding added for emphasis)

    COUNT(*) returns the number of rows in a specified table without getting rid of duplicates. It counts each row separately. This includes rows that contain null values.

    COUNT(ALL expression) evaluates expression for each row in a group and returns the number of nonnull values.

    From past experience, many have learned the adage, do not trust all that you read on the web And yet here the support for the correct answer(s) is a blog posting, while there is a reference readily available from MSDN

    QODs using images instead of easily cut and paste text have now been excluded from being published, I would propose to the powers that be that those submitted QODs that can not use either a BOL, MSDN or Technet refrence to support the correct answer(s) also be excluded from publication.

    [/rant]

    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 question for the Monday 🙂

    @Ron: the answer does have a reference to the COUNT MSDN article

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

  • Easy one, thanks.

    blog post ref. , for real?

    -------------------------------------------------------------
    "It takes 15 minutes to learn the game and a lifetime to master"
    "Share your knowledge. It's a way to achieve immortality."

  • Guessing the people who answered that both would return 10 really didn't read the question very well...

  • Very good question, I got it wrong because I didn't pay enough attention to the question! lesson to self.

  • This was removed by the editor as SPAM

  • Perfect question for a Monday, than you very much.

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

  • Currently 15% of people think that Count(columnname) on a 7-row table will return a value of 10 😉

  • Toreador (8/20/2012)


    Currently 15% of people think that Count(columnname) on a 7-row table will return a value of 10 😉

    In fairness to them, it is Monday morning... 😀

  • Gazareth (8/20/2012)


    Toreador (8/20/2012)


    Currently 15% of people think that Count(columnname) on a 7-row table will return a value of 10 😉

    In fairness to them, it is Monday morning... 😀

    As it was Monday...

    Had coffee and a cake before attempting it. Read question 3 times. 😀

    Rodders...

  • Now, had there been an option of "Table A will return 10 rows and Table B will return 7 rows" ... that could have been interesting.

  • ITS GOOD POST THANKYOU

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

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