What will be the output of the following?

  • Non of any answer is correct. But still I select -1, -0, 1 and it is showing incorrect answer.

  • Definitely at least one typo in this...

    Is there no checking / validation of these questions before they go live?

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • I was convinced that I knew the answer (-1, 0, 1 NB not -0), and so selected that one. And then you reported that I was wrong. Along with huge numbers of others.

    So I tried it on my SQLserver 2k5 and hey presto, that's what I got, -1, 0, 1.

    So what's your explanation please. A red face will do, and hour in the corner with a dunce's cap on as well will be even better!

    And, to the moderators: shame on you once again. Give us our point.

    Kenneth Spencer

    You never know: reading my book: "All about your computer" might just tell you something you never knew!
    lulu.com/kaspencer

  • Hi

    You should put the create script like this

    Create Table MyTable( mainkey int not null identity (-1,-1))

    Then only you will get correct answer.

    i got -1,0,1 ,but not yet get the points

    regards

    bornsql

  • tomasiranek (6/28/2010)


    Someone made a typo - correct answer for that sample is -1, 0, 1 - no doubt.

    So give us points and take out points to author of this QoD 😉

    Singling out one, but addressing the majority of posters so far:

    WHY, oh why, are you all so hell-bent on those points? Has your boss threatened to fire you if you don't score a minimum amount of points per day? Do you expect a raise if you score more points than your coworkers?

    I like the QotD, for the learning opportunity. Even an erroneous QotD can offer learning, if you go to the forum and read the discussion. I often take the time to correct errors or provide additional explanation of a question.

    But on days like this, when my inbox is flooded with new message notifiications but every time I go to the forum to read the new messages, all I see is childish whining from people who seem to think that a number on a website is more important than information in a brain, I am very close to just unsubscribing from the topic.


    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/

  • There does seem to be an obsession with points, but if a question is posted it should at least be "right".

  • Preet_S (6/28/2010)


    There does seem to be an obsession with points, but if a question is posted it should at least be "right".

    Agreed. But on the other hand, writing these questions is as much human work as everything else on this site. Humans make mistakes, and question authors are no exception.

    I think, f you remove all the "I want my point" feedback, plus all the feedback that is essentially a duplicate of something already posted, you reduce the already 5+ pages to one, maybe two pages. On these pages, the feedback that actually adds knowledge (and hence value) to the discussion is easy to find. Now, the interesting contributions will probably be overlooked in between all the "gimme my points now" nonsense. This greatly lowers the value of this website, which is a shame!


    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/

  • Hugo Kornelis (6/28/2010)


    Preet_S (6/28/2010)


    There does seem to be an obsession with points, but if a question is posted it should at least be "right".

    Agreed. But on the other hand, writing these questions is as much human work as everything else on this site. Humans make mistakes, and question authors are no exception.

    Oh, quite, hence my query about how (if?) these questions are moderated / checked...

    Thomas Rushton
    blog: https://thelonedba.wordpress.com

  • Come off your high horse, Hugo.

    The points are incidental: The simple fact is that the question in question contained an error, be it typographical or material. If it was the former, then the submitter needs to read his wording more carefully; if the latter, then his decision to put the question is at issue.

    We all make mistakes, and we all forgive mistakes. But on a forum of this type we expect mistakes to be acknowledged by the moderators, and then corrected.

    Kenneth Spencer

    You never know: reading my book: "All about your computer" might just tell you something you never knew!
    lulu.com/kaspencer

  • Question definitely is wrong. As others have stated - to get the "correct response" it would need to be (-1, -1)

  • I can only understand the answer if there's a type in the question.

    Was the question using identity (-1,-1)?

  • yes, there should be a mistake with either the question or the answers. I have verified it in SSMS 2008.

  • The mods live in a different time zone and it is very early morning for them. Give them a chance and I'm sure they will respond appropriately.

    Quite frankly I couldn't care less about the points. The fact that I was adjudged to be wrong made me check my assumptions about the concepts in question. I know I was right and for what reason. Therein lies today's lesson.

    Give the submitter a break, he's probably asleep blissfully unaware of the furore that has resulted from his question:)

  • Say What? :w00t:

  • What

Viewing 15 posts - 46 through 60 (of 144 total)

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