Indenting Code in SQL Server Management Studio

When writing code, it can be useful to indent the code to increase readability.

To indent code:

Select the text you want to indent and press TAB one or more times to increase the indent:

indent_code_ssms

Another way to indent the selected code is to click the 'Increase Indent' button on the Standard toolbar:

indent_code_ssms_button

To unindent code:

Select the text you want to unindent and press SHIFT+TAB one or more times to decrease the indent:

unindent_code_ssms

Another way to unindent the selected code is to click the 'Decrease Indent' button on the Standard toolbar:

unindent_code_ssms_button