Home Forums SQL Server 2005 Development Name ,Type Words turns blue color in query window RE: Name ,Type Words turns blue color in query window

  • GilaMonster (12/22/2008)


    They are SQL reserved words. Hence management studio highlights them as such.

    Not exactly. Since when is UID a reserved word? Search for UID in BOL and see what you get. It is the name of a column in some of the system tables and an abbreviation for "User ID" in connection strings.

    They ARE NOT SQL Server 2005 reserved keywords. Reserved keywords: http://technet.microsoft.com/en-us/library/ms189822(SQL.90).aspx If they were SQL reserved words they would not be able to be used in the OP's query unless they were quoted.

    They are various keywords that have been subjectively chosen by Microsoft and placed into a list within the query editor syntax coloring file.

    I've been using NAME, TYPE, STATUS as column names for decades in my relational databases. But one should always check for reserved words and not use them as object names. However, there is no guarantee that any database vendor will not use some term in the future as a "reserved keyword".


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]