Muokkaa

Jaa


Color Coding in Query Editors

Applies to: SQL Server Azure SQL Database Azure SQL Managed Instance Azure Synapse Analytics Analytics Platform System (PDW)

The text entered in the code editors is assigned a category; each category is identified by a color. The colors help you quickly find text in your code. For example, comments stand out in dark green. The following table lists the most common colors. You can view the whole list of colors and their categories, and configure a custom color scheme by using the Tools, Options menu. For more information about how to change the default colors, see Change Font Color, Size, and Style.

Default Code Colors

Color Category
Red SQL string
Dark green Comment
Black on silver background SQLCMD command
Magenta System function
Green System table, view, or table-valued function. Also, the system schemas sys and INFORMATION_SCHEMA.
Blue Keyword
Teal Line numbers or template parameter
Maroon SQL Server stored procedure
Dark gray Operators

Status Bar

You can configure registered servers or Database Engine servers in Object Explorer to have different colors in the Database Engine Query Editor status bar. This helps you identify which server each editor window is connected to when you have many windows open at the same time. For more information about setting status bar colors, see Status Bar (Database Engine Query Editor).

Some types of editors do not display the status bar, or do not support multiple colors.