It is a new usability feature introduced in SSMS (SQL SERVER Management Studio) 2008.
A vertical line in query editor window with ‘–‘sign inside a square is starting of region Region can be collapsible. When it collapses it will be like .
If you have to collapse you have to click sign. It will collapse till next region starts. And if you have to expand you have to click it will expand a particular region.
When you collapse the region a square having three points will appear right side on the first line where region has started.
Regions are defined in following situations:
1. From first Go to next Go in query.
2. Multiline statements.
3. In following blocks of SQL code
I. BEGIN...END
II. BEGIN TRY…END TRY
III. BEGIN CATCH…END CATCH
Example:
I have taken one stored procedure creation template.
See below fig.
In fig. I have circled the regions in a stored procedure creation template.
See below fig when region collapses.
When blocks like begin try…end try, begin catch…end catch etc.
When fully collapse region.
Now see example from AdventureWorks2008R2.
Fully collapsed region.
It is very useful feature when you are working with several lines of SQL query or a stored procedure which consists of say 500 or more lines of SQL queries.
SQL SERVER Management Studio 2008 - Query Editor Region
Reviewed by kamal kumar das
on
February 02, 2012
Rating:
No comments: