SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Fun with IDENTITY - Part I


Fun with IDENTITY - Part I

Author
Message
Nakul Vachhrajani
Nakul Vachhrajani
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4260 Visits: 2151
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
Google Plus: +Nakul
sknox
sknox
SSCertifiable
SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)SSCertifiable (5.3K reputation)

Group: General Forum Members
Points: 5292 Visits: 3004
Good question. It would have been more difficult if there had been an option for 1-Boston;2-New Delhi
Dhruvesh Shah
Dhruvesh Shah
SSC Eights!
SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)SSC Eights! (989 reputation)

Group: General Forum Members
Points: 989 Visits: 237
Agree. i thought that it's testing for identity column values. but still good question.
UMG Developer
UMG Developer
SSCertifiable
SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)SSCertifiable (5.4K reputation)

Group: General Forum Members
Points: 5444 Visits: 2204
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
Chris Houghton
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1074 Visits: 1715
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
jts2013
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1690 Visits: 5009
I was looking for the catch - nice that for once it wasn't a trick question!
DugyC
DugyC
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1936 Visits: 779
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.

_____________________________________________________________________
"The difficult tasks we do immediately, the impossible takes a little longer"
ziangij
ziangij
Hall of Fame
Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)Hall of Fame (4K reputation)

Group: General Forum Members
Points: 3955 Visits: 380
thanks... got to learn something new today.. .:-)
NickDBA
NickDBA
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1275 Visits: 945
Interesting to see in action that uncommitted transactions still affect the identity values. Nice.
cengland0
cengland0
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2674 Visits: 1300
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search