Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"collapse all' or "toggle outline" in SQL Server Management Studio 2008

A new feature in SQL Server Management Studio 2008 is 'outlining' (the ability to collapse regions). It is awesome. However, by default all regions are expanded. I can't seem to find a way to 'collapse all' (also called 'toggle outline' in Visual Studio). Is anyone aware of a way to do this? I've been tasked with reviewing a 3,000 line stored procedure, and collapsing regions one-by-one is cumbersome.

like image 731
Shawn McGough Avatar asked Dec 04 '09 23:12

Shawn McGough


People also ask

How do you collapse a line in SQL?

You can click the minus sign on the SELECT * line to collapse just that SELECT statement. To collapse the whole BEGIN - END block, click the minus sign on the BEGIN line.

What is collapse in SQL?

The following collapse functions take two input sequences, left and right, and produce the result sequence of type double where the computed scalar result is the first element. The two input sequences must be of the same type.


1 Answers

This isn't a shortcut key, but there is a menu option in the Query Editor to do this.

Open your query and then go to Edit > Outlining > Toggle All Outlining.

This will toggle (i.e. expand/collapse) all nodes in the query.

like image 188
SqlGuy Avatar answered Sep 26 '22 02:09

SqlGuy