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

If the post helped you, please share it:
Pin It

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">