Speaking the language of business intelligence with an Australian accent

Wednesday, October 19, 2005

SSMS - Comment keyboard shortcut

Unfortunately the T-SQL comment and uncomment keyboard shortcuts in SSMS are now a little more involved, probably as a result of the new consolidated management environment. In (am I allowed to say "Classic" yet?) Query Analyser CTRL + SHIFT + C and CTRL + SHIFT + R would comment and then uncomment the block of selected SQL code. In Management Studio we now need to use CTRL + K then CTRL + C to comment and CTRL + K then CTRL + U to uncomment the selected text. This is a bit awkward but I guess we'll have to get used to it. On the brighter side, this new comment shortcut can be used the same way for SQL, MDX, DMX, AMO and SQL Mobile queries.

The most recent list of shortcuts can be found here. And of course your local copy of BOL.

UPDATE: Thank you to Graham who has corrected me on the shortcuts:

You can go to ToolsOptions... and click on Keyboard underneath Environment. There you have an option to change the keyboard scheme to SQL Server 2000 which will use the "classic" keyboard shortcuts.

If I'd have bothered to read the text at the top of the Keyboard Shortcuts reference page I would not have posted this. Apologies for my laziness...

2 comments:

Graham said...

You can go to Tools|Options... and click on Keyboard underneath Environment. There you have an option to change the keyboard scheme to SQL Server 2000 which will use the "classic" keyboard shortcuts.

Wanna said...

Awesome tip!