Share via


Transact-SQL Editor Options (Query Execution/General)

Use this page to specify the options for running queries and scripts in the Transact-SQL editor. If you make changes with the Options dialog box, they will apply only to new instances of the editor. Existing instances will maintain the global settings that were in effect when that instance of the editor was created. If you make changes with the Query Options dialog box, they will apply only to the active Transact-SQL editor window. For more information, see How to: Set Options for Query Execution and Results.

  • SET ROWCOUNT
    If you specify a non-zero value, results will include only the number of rows that you specified. If you specify 0, SQL Server returns all rows that meet the criteria of the query. The default value is 0.

  • SET TEXTSIZE
    If you specify a value, results will include only the number of bytes that you specified for text, ntext, varchar(max), nvarchar(max), varbinary(max), and image fields. The default value of 2,147,483,647 bytes will return the complete content of these fields.

  • Execution time-out
    If you specify a non-zero value, SQL Server will wait the specified number of seconds for results before it cancels a query. The default value of 0 specifies an infinite wait (in other words, no time-out). You must specify a value between 0 and 32000.

  • Batch separator
    You specify the word that will be used to separate Transact-SQL statements into batches. The default value is GO.

  • By default, open new queries in SQLCMD mode
    If you select this check box, new queries open by default in SQLCMD mode and allow you to execute SQLCMD commands along with Transact-SQL statements. If this check box is cleared and you use a SQLCMD command, an error message appears. By default, this check box is selected.

  • Reset to Default
    You can click this button to restore all settings on this page to their default values.

See Also

Tasks

How to: Set Options for Query Execution and Results

How to: Control the Gathering and Display of Client Statistics

Reference

Transact-SQL Editor Options (Editor Tab and Status Bar)

Transact-SQL Editor Options (Query Execution/Advanced)

Transact-SQL Editor Options (Query Execution/ANSI)

Transact-SQL Editor Options (Query Results/General)

Transact-SQL Editor Options (Query Results/Grid)

Transact-SQL Editor Options (Query Results/Text)

Concepts

Editing Database Scripts and Objects with the Transact-SQL Editor