Identity Column Datatype

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

  • Easy questions gotta be there too 😀

  • 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

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

    Thanks for sharing.

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

  • Easy one!

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

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

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

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

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

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

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

    Thanks & Best Regards,
    Hany Helmy
    SQL Server Database Consultant

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

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

  • Thanks for the question.

  • 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 asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

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

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