Share via


Transact-SQL Editor Options (Query Results/Grid)

Use this page to specify how results appear as a grid 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.

  • Include the query in the result set
    If you select this check box, execute a query, and show the results as a grid, the query will appear on the Messages tab of the Results pane as a comment. By default, this check box is cleared.

  • Include column headers when copying or saving the results
    If you select this check box and then copy data from the grid to the Clipboard, you will also copy the column headers. If you clear this check box, you will copy only the data in the grid, not the column headers. By default, this check box is cleared.

  • Quote strings containing list separators when saving .csv results
    Enclose a string containing one or more commas with double quotation marks. The string abc,def will be saved as "abc,def".

  • Discard results after execution
    Select this check box to discard the query results after they are displayed in the results pane of the query window.

  • Display results in a separate tab
    Select this check box to display the result set in a new document window, instead of at the bottom of the query document window.

  • Switch to results tab after the query executes
    Select this check box to automatically set the screen focus to the result set.

  • Maximum characters retrieved for non-XML data
    You can specify the maximum number of characters that are retrieved for columns that do not contain XML. By default, the value for this option is 65535.

  • Maximum characters retrieved for XML data
    You can specify the maximum size of the XML data that is retrieved for columns that contain XML. You can specify 1 MB, 2 MB, 5 MB, or Unlimited. By default, the value for this option is 2MB.

  • Reset to Default
    You can click this button to reset all options 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/General)

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/Text)

Concepts

Editing Database Scripts and Objects with the Transact-SQL Editor