To use space characters, choose the Insert space radio button. If you want to use the tab characters for tab and indent operations, select the Keep tabs radio button.
In the Tab section of the Tabs tab, how many spaces compose a single indentation or tab can be set. With the Smart radio button selected, SSMS determines which indenting style will be used: When the Block radio button is chosen, the cursor aligns with the previous line when the Enter key is hit: When the None radio button is selected, every time when hitting the Enter key from the keyboard, the cursor in a query editor goes to the beginning of the next line: These three options are located under the Tabs tab of the All Languages sub-tab: In SSMS, there are three options for indenting of SQL code: Make all code in upper or lower case, comment/uncomment selected code, etc. SSMS provides a couple of options to format SQL code.
This article will describe how to format SQL code using SQL Server Management Studio (SSMS) native options and how to format SQL code using a third-party SQL formatter tool.Ī well-formatted SQL code is easily readable and reviewing such code can be much easier and faster than a non-formatted SQL code.