My favorite SQL editing shortcut

Keyboard Shortcuts ROCK!

I love a lot about editing code in SQL Server Management Studio (SSMS).  There are so many cool keyboard shortcuts.  When you bring a tool like Redgate SQL Prompt into the mix the things you can do just get crazy!  THIS post however, highlights an editing feature built into SSMS (all recent versions afaik).  It’s one of those tricks where once I learned it I couldn’t believe I’d managed to get anything done without it.

Column Select in SSMS

This trick is pretty easy.  Click at the top of a column you want to select, hold the SHIFT and CONTROL keys down at the same time (SHIFT + CTRL) and then drag your mouse down.  In the video below you can see me doing this to position the cursor at the beginning of each column so I can add a column alias to all of them at the same time.  At the end of the video I do the same trick to remove the column alias from each field at the same time.

 

It turns out you can do the same thing in a lot of text editors.  Here’s a vid of the same trick in the current version (7.33) of Notepad++

 

Do you have any favorite shortcuts or productivity tips for editing in SSMS (or Notepad++) ?  Share them in the comments!

Leave a Reply

Your email address will not be published. Required fields are marked *