If SQL Server Management Studio is your primary tool for writing your TSQL, then you need to learn keyboard shortcuts to be more efficient.
Keyboard shortcuts are a combination of one or more keys that when entered together perform some task, that would normally take a mouse click, or multiple commands to accomplish. There are many different types of categories of keyboard short cuts, toolbar, menu, window management and cursor movement to name a few.
- F5 – Executes TSQL script
- CTRL+N – Opens a new query window using the existing connection
- CTRL+K+C – Comments out a set of lines highlighted
- CTRL+K+U – Uncomments a set of lines highlighted
- CTRL+SHIFT+U – Converts highlighted characters to upper case
- CTRL+SHIFT+L – Converts highlighted characters to lower case
- CTRL+F – Brings up the search window
- CTRL-HOME –Repositions the cursor at beginning document
- CTRL-END – Reposition the cursor to end of document
- CTRL+G – Allows you to jump to a specific line in a script
These is are my 10 favorite, most-used shortcuts. If you’d like to see all of the keyboard shortcuts, you can find them here.