There are a few tools and add-ins that support the creation of “regions” in T-SQL code. SQL Server Management Studio (SSMS) supports one way to separate sections of long-ish T-SQL scripts natively, by using begin/end:
To demonstrate, start with a snippet of T-SQL that includes begin/end:
If you click on the “-“ highlighted above, the code will collapse and appear as show here:
If you add a comment…
Collapsing displays your comment, creating a quick “region” in your T-SQL:
:{>
Comments