Surround With Feature in SSMS in Denali CTP1 – Usability Enhancements in SSMS in SQL Server code-named Denali – Part 3

Here is another interesting feature called Surround With, introduced in SQL Server Management Studio (SSMS) in Denali CTP1. This feature allows us to select a set of T-SQL statements and enclose them into Transactional, Conditional, & Looping etc. constructs like Begin-End, If-Else, & While etc. Let us take a quick look at this feature.
Here are the step-by-step instructions for using Surround With feature of SSMS in Denali CTP1.

1. Select one or more lines/statements of T-SQL and right click and select Surround With… option from the context menu as shown below.

2. On selecting Surround With… from context menu, this brings up the Surround With menu with a list of options like Begin, If etc. as shown below.

3. From the list of options available in the Surround With drop down list, select the appropriate option/construct in which you want your code selected in first step to be enclosed. This will enclose the selected code snippet (in step 1) into the selected construct (in step 2) as shown below.

Here are other articles in the series Usability Enhancements in SSMS in SQL Server code-named Denali:

About Dattatrey Sindol (Datta)

Datta is a Microsoft BI Enthusiast, passionate developer, and a blogger. View Full Profile

Posted on January 5, 2011, in SQL Server, SQL Server 2012, SSMS. Bookmark the permalink. 1 Comment.

What are your thoughts?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s