Microsoft KB Archive/315689

= INF: SQL Query Analyzer Color Code Information =

Article ID: 315689

Article Last Modified on 10/17/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q315689



SUMMARY
SQL Query Analyzer color codes words based on their category. While you can find the color code that goes with each category of words in SQL Server Books Online, it is not always easy to tell what words fit into each category. This article will help to clarify which types of words fit into each SQL Query Analyzer category for the purposes of color-coding.



MORE INFORMATION
To see the color code that goes with each category, see the &quot;Color Coding in SQL Query Analyzer&quot; topic in SQL Server Books Online.

SQL Query Analyzer has a broader definition of keywords than the SQL Server engine. The Query Analyzer list is not merely the list of words listed in SQL Server Books Online topic &quot;Reserved Keywords.&quot; Some ODBC keywords, some future keywords, and also some other words are included in the Query Analyzer list.

The color code category &quot;Stored Procedure&quot; applies to any stored procedure or user-defined function that was created during the original installation of Microsoft SQL Server. Therefore, any stored procedure or function that is system-supplied is dark red.

The color code &quot;magenta&quot; shows up on many monitors as a &quot;dark pink.&quot; SQL Query Analyzer color codes systems functions as &quot;magenta.&quot; Global variables such as @@VERSION are considered by SQL Query Analyzer to be system functions.

Some words have different meanings when pre-pended with non-alphabetical characters such as the &quot;at&quot; signs (@@) you use with global variables or the double colons you use to call functions. Currently, these types of words are only colored for one category, even though in some cases they would fit in multiple categories. Some examples are:


 * The @@IDENTITY global variable is color coded as a system function; however, IDENTITY, which is a keyword, is black.
 * The @@ROWCOUNT global variable is color coded as a system function; however, ROWCOUNT, which is a keyword, is black.
 * The @@TEXTSIZE global variable is color coded as a system function; however, TEXTSIZE, which is a keyword, is black.
 * The fn_trace_gettable system function is color coded magenta; however, the ::fn_trace_gettable system function is black.
 * The fn_helpcollations system function is color coded magenta; however, the ::fn_helpcollations function is black.

Version Information
The version of Query Analyzer that is provided with SQL Server 2000 will color code words that were valid in Microsoft SQL Server 6.5, SQL Server 7.0, and SQL Server 2000.

The version of Query Analyzer that is provided with SQL Server 7.0 will color code words that were valid in either SQL Server 6.5 or SQL Server 7.0.

There are a handful of keywords that were valid in SQL Server 6.5 that are not valid in later releases. Therefore, some words may be color-coded; however, when you run the command against a version of SQL Server that does not support the syntax you will receive an error.

Additional query words: color code coding blue grey scheme colons at signs punctuation QA client tools utilities

Keywords: kbinfo KB315689

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.