Fun with IDENTITY - Part I

  • Nakul Vachhrajani

    SSChampion

    Points: 10221

    Comments posted to this topic are about the item Fun with IDENTITY - Part I

    Thanks & Regards,
    Nakul Vachhrajani.
    http://nakulvachhrajani.com
    Be courteous. Drive responsibly.

    Follow me on
    Twitter: @sqltwins

  • sknox

    SSChampion

    Points: 12292

    Good question. It would have been more difficult if there had been an option for 1-Boston;2-New Delhi

  • Dhruvesh Shah

    SSCrazy

    Points: 2303

    Agree. i thought that it's testing for identity column values. but still good question.

  • UMG Developer

    SSChampion

    Points: 13482

    I agree, nice question, but it would have been even better with a fourth option: 1-Boston;2-New Delhi

    Without that option it was really a test of transactions, not of IDENTITY. (Maybe that was the point to through people off the scent?) 😉

  • Chris Houghton

    SSCrazy

    Points: 2497

    Agreed, I was expecting it to be a trick question. A 2 New Delhi option would've made it less obvious. It is still good to be reminded that the identity column counter doesn't revert to the previous value when a transaction affecting it is rolled back.

    Thanks

  • jts2013

    Hall of Fame

    Points: 3226

    I was looking for the catch - nice that for once it wasn't a trick question!

  • DugyC

    Hall of Fame

    Points: 3804

    Good question but, regardless of whether it was a "deception" or to "throw people off the scent", the lesson was lost in the absence of the fourth option for "1 Boston, 2 New Delhi".

    Just seems like a trick was missed, I imagine a lot of people may have gone for this fourth option and when it was pointed out they were wrong they'd learn more because they were focus'ed on why they got it wrong.

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

  • ziangij

    SSCertifiable

    Points: 7210

    thanks... got to learn something new today.. .:-)

  • NickDBA

    Hall of Fame

    Points: 3684

    Interesting to see in action that uncommitted transactions still affect the identity values. Nice.

  • cengland0

    SSCertifiable

    Points: 6102

    jts_2003 (9/29/2010)


    I was looking for the catch - nice that for once it wasn't a trick question!

    Same here. I'm always looking for typos or some other trick.

    Nice to see a straight-forward question for a change.

  • SQLRNNR

    SSC Guru

    Points: 281243

    Thanks for the question.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • Mike Is Here

    Hall of Fame

    Points: 3348

    UMG Developer (9/28/2010)


    I agree, nice question, but it would have been even better with a fourth option: 1-Boston;2-New Delhi

    Without that option it was really a test of transactions, not of IDENTITY. (Maybe that was the point to through people off the scent?) 😉

    Agreed, reading the question I was thinking would New Delhi be 2 or 3. When 2 was not an option that answer was clear.

  • sjimmo

    SSChampion

    Points: 11139

    Good question - after the fun with transactions, nobody should have gotten this one wrong:-P

    Steve Jimmo
    Sr DBA
    “If we ever forget that we are One Nation Under God, then we will be a Nation gone under." - Ronald Reagan

  • SanjayAttray

    SSChampion

    Points: 13157

    Easy one. With Begin and Rollback Transaction included in question it's easy to select correct answer.

    SQL DBA.

  • Daniel Bowlin

    SSC-Dedicated

    Points: 34566

    It's nice to get a QoTD once in a while without a trick. Nice question.

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

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