Options (Text Editor/Transact-SQL/Tabs Page)

The Options dialog box lets you change the default behavior of the Database Engine Query Editor while you are programming Transact-SQL scripts. To display these settings, click Options on the Tools menu, expand the Text Editor folder, expand the Transact-SQL subfolder and then click Tabs.

Indenting

  • None
    When this option is selected, the new line created when you press ENTER is not indented. The cursor is placed at the first column of the new line.

  • Block
    When this option is selected, the new line created when you press ENTER is automatically indented the same distance as the previous line.

  • Smart
    This option is unavailable.

Tabs

  • Tab size
    Sets the distance in spaces between tab stops. The default is four spaces.

  • Indent size
    Sets the size in spaces of an automatic indentation. The default is four spaces. Tab characters, space characters, or both are inserted to fill the specified size.

  • Insert spaces
    When this option is selected, indent operations insert only space characters, not tab characters. If Indent size is set to 5, for example, then five space characters are inserted whenever you press the TAB key or click the Increase Indent button on the toolbar in the main SQL Server Management Studio window.

  • Keep tabs
    When this option is selected, indent operations insert as many tab characters as possible. Each tab character fills the number of spaces specified in Tab size. If Indent size is not an even multiple of Tab size, space characters are added to fill in the difference.