Format SQL Code

SSMSBoost allows you to format SQL Code using two different formatting engines.

SSMSBoost formatting engine

SSMSBoost formatting engine offers you a wide variety of options. The best way to learn them is to use a built-in Templates editor which will apply changes to the formatting template while you're editing it.

To create/edit a formatting template:

  • Open one of your SQL scripts (it will be used to display formatting result while you're changing options)
  • Run SSMSBoost ->Query->SQL Format style templates editor



  • Change template options and they will immediately be applied to your code.
  • Hit "Save changes" when you are done


Now that you have created your own formatting template you can choose it on the toolbar in the formatting drop-down and hit "Format" anytime to format your SQL code.



You can also manage formatting templates under SSMSBoost->Settings->Formatting. Here you can find import/export option that allows you to share templates with your colleagues.

SSMSBoost code formatting in SSMS

"Poor Man's T-SQL Formatter"

This formatter is added as an external tool which SSMSBoost calls in the background. The project's name is "Poor Man's T-SQL Formatter" and it is displayed as "Old fashioned formatting" in formatting drop-down. Project author Tao Klerk did not update it for several years but many users were asking if it is possible to use this formatter under the latest SSMS versions, so we decided to include it into our add-in.
You can configure formatting options under SSMSBoost->Settings->Formatting->Old fashioned formatting.