• Koen Verbeeck (2/10/2013)


    For me the question was more about the fact you can use Integer instead of int. Didn't know that 😀

    The question cleverly had no color coding on the word Integer, so I assumed SSMS didn't recognize it. But actually it does when you copy paste the code into SSMS.

    I think that's a shortcoming of SQLServerCentral's color-coding algorithm. Last time I submitted a question, I just had to paste in the query and the color-coding was added automagically.

    I'm surprised you didn't know this. Integer is actually the official name; int is an accepted abbreviation.

    *cough* I have to retract the above. That's what I always thought, but when I went out to find a Books Online reference, I was surprised to see only "int" there. "Integer" is not even mentioned. :unsure:

    EDIT: Found the source of my confusion. The ANSI documents describing the SQL standard define both INT and INTEGER, and describe INT as "equivalent to INTEGER". I've always interpreted that as "INTEGER" being the official form and "INT" being an accepted alternative.


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/