In SQL Server Management Studio 2008, whenever you have a "block" of code (BEGIN….END, etc) SSMS will put a little plus-sign in the margin and allow you to "collapse" that block of code so you only see the BEGIN, not stuff underneath. If you’re working with a really large set of code, that’s helpful.
But I got an e-mail from a friend that said her SSMS didn’t do that. I was kind of surprised, since I never had to do anything to make it work. We did a little digging, and come to find out it is in fact an option. Of course, we couldn’t make it easy to find 🙂 so I thought I would let you know where that option is in case you want to turn it off or back on (default, by the way, is on):
From the menu bar open Tools | Options
Open Text Editor | Transact-SQL | Intellisense (Yes, Intellisense. I have no idea why it is there. Just open it)
Then click the checkbox next to "Outline Statements" (No, I also have no idea why it is called that. I guess "Code Collapse" was too easy and wouldn’t give me any material for a blog post)
Close everything out and re-open. Ta-da! By the way, this option is documented in Books Online, but not like this. Just thought you should know.