The query editors include the following windows:
-
Query Editor. This window is used to write and execute scripts.
-
Results. This window is used to view the results of a query. The window can display the results in grid or in text.
-
Messages. This window displays errors, warnings, and informational messages that are returned by the server when a script is run. The list of messages does not change until the script is run again.
-
Error List. This window displays syntax and semantic errors found by the IntelliSense feature in the Database Engine Query Editor. The list of errors changes dynamically as you edit Transact-SQL scripts. The Error List only displays errors from the Database Engine Query Editor; it does not display errors from the other editors.
-
Client Statistics. This window displays information about the query execution grouped into categories. When Include Client Statistics is selected from the Query menu, a Client Statistics window is displayed upon query execution. Statistics from successive query executions are listed along with the average values. Select Reset Client Statistics from the Query menu to reset the average.
The following table lists SQL Server Books Online topics related to the code editor.
To access a SQL Server Management Studio Query Editor
-
On the File menu, click New, and then click File.
The New File dialog box appears.
Click the type of query you want to create. For example, to create a Transact-SQL Query, click Database Engine Query.
The Query Editor window appears.
-
On the SQL Server Management Studio toolbar, click the button for the query editor that you want to open. For example, to create an XMLA query, click Analysis Services XMLA Query.
The Query Editor window appears.
To access the Database Engine Query Editor from Template Explorer
-
On the View menu, click Template Explorer.
The Template Explorer window appears in the lower right.
-
Double-click a template to open a Database Engine Query window with the text of the template. For example, to open a CREATE DATABASE template, open the SQL Server Templates folder, open the Databases folder, and double-click create database.
To view the code editor in full-screen mode
To view the Management Studio Error List window