Click here to monitor SSC

FatherJack

SQL Q+A forum at ask.sqlservercentral.com | Follow fatherjack on Twitter

The hidden benefits of SSMS

Published Thursday, September 02, 2010 7:55 PM

Every good DBA/developer writes their code with some comments/instructions at the top. Now in many cases this is important to have visible when running the code as it may give advice on the results or what certain column values will mean. Now you can split the code window, like you can in Excel but to my mind that just decreases the amount of information on the screen as you are dividing it into more parts.

My preference is to collapse the section of code by clicking the image at the top of the code section I want to execute and then highlight it with the mouse and run it, either with Ctrl + E or F5. This way we can read the comments about the script/results and see the results. Wonderful.

image

I hope this is of use to you, let me know your favourite SSMS tip or trick in the comments.

by fatherjack
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

 

Thomas Rushton said:

ALT+SHIFT+RETURN.

Gets rid of all the rest of the gubbins and dumps you into full-screen mode, just you, your query and your results pane.  Bliss!
September 2, 2010 9:52 PM
 

Todd said:

Does this require a certain SSMS version or a specific option set?  I'm using SSMS 9.00.4035.00 (2005) and cannot seem to do the code collapse.
September 3, 2010 7:24 PM
 

fatherjack said:

Hi Thomas, yeah, that's a good one to clear away a load of clutter to get down to some  coding.

cheers

Jonathan
September 3, 2010 8:15 PM
 

fatherjack said:

Hi Todd,
Yes, I'm afraid this is a feature that comes along with SSMS for SQL 2008. There isnt anything stopping you installing the 2008 tools to manage SQL 2005 , or even SQL 2000 servers though so you could get those tools on your PC and benefit from that and the other new features like Intellisense too.
Jonathan
September 3, 2010 9:03 PM

What do you think?

(required) 
(optional)
(required) 

About fatherjack

DBA since 1999 working for not-for-profit company. http://twitter.com/fatherjack,
<September 2010>
SuMoTuWeThFrSa
2930311234
567891011
12131415161718
19202122232425
262728293012
3456789
How to Kill a Company in One Step or Save it in Three
 The majority of companies that suffer a major data loss subsequently go out of business. David Wesley... Read more...

Migrating from OCS 2007 R2 to Lync: Part 4
 Having migrated the rest of our users and legacy resources across, and start getting ready to... Read more...

Automated Script-generation with Powershell and SMO
 In the first of a series of articles on automating the process of building, modifying and copying SQL... Read more...

Seth Godin: Big in the IT Business
 Seth Godin has transformed our understanding of marketing in IT. He invented the concept of 'permission... Read more...

Using SQL Test Database Unit Testing with TeamCity Continuous Integration
 With database applications, the process of test and integration can be frustratingly slow because so... Read more...