THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Andy Leonard

Andy Leonard is an author and engineer who enjoys building and automating data integration solutions. Andy is co-host of the Data Driven podcast.

Quick Regions in SQL Server Management Studio (SSMS)

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:

SSMSRegion0

If you click on the “-“ highlighted above, the code will collapse and appear as show here:

SSMSRegion1

If you add a comment…

SSMSRegion2

Collapsing displays your comment, creating a quick “region” in your T-SQL:

SSMSRegion3

:{>

Published Friday, April 14, 2017 10:00 AM by andyleonard
Filed under: ,

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

News

My Latest Book:

Community Awards



Friend of Red Gate

Contact Me

Archives

Privacy Statement