Identity Column Datatype

  • Pulivarthi Sasidhar

    SSCertifiable

    Points: 6706

    Comments posted to this topic are about the item Identity Column Datatype

  • sqlsniper

    Right there with Babe

    Points: 734

    Easy questions gotta be there too 😀

  • TomThomson

    SSC Guru

    Points: 104772

    This is a rather early repeat! We had an identical question on Jan 13th, less than 2 months ago; and then on Jan 20th we had another question for which the answer to this one was the first part of the explanation.

    So a nice easy question, and it will be rather disappointing if the correct answers end up much below 100%.

    Tom

  • twin.devil

    SSC-Insane

    Points: 22208

    nice question. it get a lot easier if you Remember the Msg 2749, Level 16, State 2, Line 1 error message.

    Thanks for sharing.

  • Toreador

    SSChampion

    Points: 11242

    TomThomson (3/7/2015)


    So a nice easy question, and it will be rather disappointing if the correct answers end up much below 100%.

    Currently just 61%. And looks like 2% didn't realise that INT could be used - maybe they misread the question as which 3 cannot be used?

  • Koen Verbeeck

    SSC Guru

    Points: 258955

    Easy one!

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

  • mwpowellhtx

    Old Hand

    Points: 356

    There's also uuid. Also I'm not sure hierarchyid, but I would need to cross reference the docs.

    Holy cow, though, 20%, 12%, 9%, confused about floating point data types? Scary...

    I did answer correctly, BTW.

  • RLilj33

    SSCrazy

    Points: 2146

    This one threw me off. Can someone explain BOL (https://msdn.microsoft.com/en-us/library/ms189838.aspx):

    "data_type

    Is the data type of the identity column. Valid data types for an identity column are any data types of the integer data type category, except for the bit data type, or decimal data type."

    Thanks.

  • Hany Helmy

    SSChampion

    Points: 13435

    Toreador (3/9/2015)


    TomThomson (3/7/2015)


    So a nice easy question, and it will be rather disappointing if the correct answers end up much below 100%.

    Currently just 61%. And looks like 2% didn't realise that INT could be used - maybe they misread the question as which 3 cannot be used?

    Counting down 🙂 currently only 57% got it right, W0W!

  • mwpowellhtx

    Old Hand

    Points: 356

    Well, to be fair, I don't think you can 'sum' the percentages, as they are percentage of each type answered. But still... Always read the docs...

  • Hany Helmy

    SSChampion

    Points: 13435

    TomThomson (3/7/2015)


    This is a rather early repeat! We had an identical question on Jan 13th, less than 2 months ago; and then on Jan 20th we had another question for which the answer to this one was the first part of the explanation.

    Yes, identical with that one, good catch 😉

  • RLilj33

    SSCrazy

    Points: 2146

    Thanks for the question Sasidhar.

    2nd Edit: Apologies. My first edit accidentally removed my original post:

    This one threw me off. Can someone explain BOL (https://msdn.microsoft.com/en-us/library/ms189838.aspx):

    "data_type

    Is the data type of the identity column. Valid data types for an identity column are any data types of the integer data type category, except for the bit data type, or decimal data type."

    And thanks to all for the replies below.

  • Xavon

    SSCrazy

    Points: 2280

    RLilj33 (3/9/2015)


    This one threw me off. Can someone explain BOL (https://msdn.microsoft.com/en-us/library/ms189838.aspx):

    "data_type

    Is the data type of the identity column. Valid data types for an identity column are any data types of the integer data type category, except for the bit data type, or decimal data type."

    Thanks.

    That sentence is a little tough the parse, but think of it like:

    Valid data types for an identity column are (any data types of the integer data type category, except for the bit data type) or (decimal data type).

    That still does not include numeric, but gets it closer.

  • akljfhnlaflkj

    SSC Guru

    Points: 76202

    Thanks for the question.

  • webrunner

    One Orange Chip

    Points: 29988

    Thanks for the question. It is curious that anything except ints would be allowed for identity, but OK.

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and says Can I join you?
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

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

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