View Editor tab - T-SQL

Last modified: May 28, 2025

The T-SQL tab allows you to preview and edit a DDL script generated to create a view.

View Editor - T-SQL

Manage the script

To manage the SQL text, right-click anywhere in the T-SQL box and select the required option from the shortcut menu.

Copy SQL code

To copy SQL code, right-click the T-SQL box and select Copy.

Alternatively, press Ctrl+C.

Cut SQL code

To cut SQL code, right-click the selected code and select Cut.

Alternatively, press Ctrl+X.

Paste SQL code

To insert the copied code, place the cursor where you want to insert the code, right-click it, and select Paste.

Alternatively, press Ctrl+V.

Format the script

To format the whole code, do one of the following:

  • Right-click the T-SQL box and select Format > Format Document.
  • Press Ctrl+K,D.

To format the current statement, do one of the following:

  • Right-click the T-SQL box and select Format > Format Current Statement.
  • Press Ctrl+K,S.

To format a certain code fragment, select the required code fragment and do one of the following:

  • Right-click the T-SQL box and select Format > Format Selection.
  • Press Ctrl+K,F.

To apply an active formatting profile to the code, right-click the T-SQL box and select Format > Active Format Profile > choose the required profile from the list.

Save changes

An asterisk (*) in the object name on the tab title indicates unsaved changes. To save and apply them, select Apply Changes.

Refresh the view

To update the view to reflect the latest changes, on the View Editor toolbar, select Refresh Object.

Script changes

To script changes:

1. On the View Editor toolbar, select the Show Script Changes arrow in the Script Changes list.

2. To open the generated script in a new SQL document, select To New SQL Window.

Alternatively, press Shift+Alt+C.

3. To copy the generated script to the clipboard, select To Clipboard.

This script allows you to review, modify, or execute the script manually instead of applying changes immediately.