Fun with IDENTITY - Part I

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

    Thanks & Regards,
    Nakul Vachhrajani.
    http://nakulvachhrajani.com

    Follow me on
    Twitter: @sqltwins

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

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

  • 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, 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

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

  • 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]

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

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

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

  • 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

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

  • 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

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

    SQL DBA.

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

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

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