SQL Editor is a text editing interface for writing, editing, and running SQL queries, scripts, and statements against your databases. It includes code-specific features, such as syntax highlighting, code completion (IntelliSense), formatting, error detection, code snippets and templates, and navigation tools.
You can open multiple SQL documents to view and edit SQL code simultaneously. To switch between open documents, use the Window menu, which lists all active documents.
You can open SQL Editor by using Database Explorer, the menu bar, the Standard toolbar, the Start Page, or a keyboard shortcut.
To open SQL Editor, right-click a required server connection or a database, then select New SQL.
To open SQL Editor, use one of the following ways:
To open SQL Editor, use one of the following ways:
Click New SQL.
Click
.
To open SQL Editor, click SQL Development > SQL Editor.
To open SQL Editor, press Ctrl+N.
Note
The XML editor provides similar text-editing functionality and includes syntax highlighting for XML. To customize XML highlighting and color settings, select Tools > Options > Environment > Fonts and Colors.
SQL Editor consists of the following components:
The toolbar provides quick access to features such as code completion, commenting and uncommenting code, bookmarks, and other editing tools.

The table describes SQL Editor toolbar commands.
| Icon | Name | Description | Keyboard shortcut |
|---|---|---|---|
| Display an Object Member List | Displays valid database objects, such as databases, tables, and columns. To insert an item, select it, press Tab, type a space, or type a period. |
Ctrl+K, Ctrl+L | |
| Display a Parameter Info | Displays parameter information when you type a function or stored procedure followed by an opening parenthesis (. |
Ctrl+Shift+Space | |
| Display Quick Info | Displays general information about an identifier when you hover over it. | Ctrl+K, I | |
| Display Word Completion | Displays completion suggestions for the word you’re typing. | Ctrl+K, W | |
| Refresh Suggestions | Refreshes code completion suggestions to reflect recent changes. | Ctrl+Shift+R | |
| Enable/Disable Code Completion for current document | Turns code completion on or off for the active document. | ||
| Decrease Line Indent | Moves selected lines one indentation level to the left. | ||
| Increase Line Indent | Moves selected lines one indentation level to the right. | ||
| Comment out the selected lines | Turns the selected lines into comments, making them non-executable. | Ctrl+K, C | |
| Uncomment the selected lines | Removes comment markers from the selected lines, making the code executable. | Ctrl+K, U | |
| Toggle a bookmark on the current line | Adds or removes a bookmark on the selected line. | Ctrl+K, K | |
| Move the caret to the previous bookmark | Moves the cursor to the previous bookmark. | Ctrl+K, Ctrl+P | |
| Move the caret to the next bookmark | Moves the cursor to the next bookmark. | Ctrl+K, Ctrl+N | |
| Clear all bookmarks in the current document | Removes all bookmarks from the active document. | Ctrl+K, L | |
| Format Document | Formats SQL code in the active document. | Ctrl+K, D | |
| Format Current Statement | Formats the SQL statement at the cursor position. | Ctrl+K, S | |
| Analyze Code | Scans the SQL script to identify syntax errors, logical issues, and best practice violations before execution. |
To configure SQL Editor settings, use one of the following ways:

The status bar displays information about the current database connection, including the connection status, server, user, and selected database.

When you run a query, the status bar displays its execution status. After execution, it also displays the query execution time.
