SQL and XQuery editor

You can develop queries for both relational and XML data by creating SQL and XQuery statements in the SQL and XQuery editor.

The tool supports the creation of one or more statements of either type, as well as the nesting of either type of statement. Statements that you create and save are stored in a file with the extension .sql.

The SQL and XQuery editor provides the following features:
Multiple statement support
You can type multiple statements in an .sql file and then run them.
Variable statement terminator
By default, the SQL and XQuery editor uses a semicolon ( ; ) as the default statement terminator. You can specify a different statement terminator for the statements that you create in the SQL and XQuery editor.
Syntax highlighting
To aid you in differentiating the elements in an SQL statement or an XQuery statement, syntax highlighting renders different kinds of elements in the text in unique colors.
Content assist
Content assist is an editing tool that provides you with helpful information as you type an SQL or XQuery statement. For example, after you type the dot that follows a schema qualifier in an SQL statement, content assist supplies a list of the tables in the schema.

As you develop your statement, you can press Ctrl + Space at any time to see context-sensitive coding help in the content assist window.

Query parsing and validation
As you type, the parser checks the syntax of both SQL and XQuery expressions, and provides a visual indication of any errors that it detects in the query.
Related tasks
Changing the SQL statement terminator
Validating SQL and XQuery statements
Creating SQL and XQuery statements in the SQL and XQuery editor by using the File menu
Creating SQL and XQuery statements in the SQL and XQuery editor by using a data project
Creating SQL and XQuery statements in the SQL and XQuery editor by using a database connection
Creating SQL and XQuery statements in the SQL and XQuery editor by using the Data Source Explorer toolbar

Feedback