Tuesday, March 31, 2015

Microsoft SQL Server keyboard shortcuts

  1. Press Windows+R
  2. Type ssms
  3. Press the OK button


Accessing common windows in SQL Server Management Studio

Here are the shortcut keys for common SSMS windows:
  • F8 - Object Explorer
  • CTRL+ALT+T - Template Explorer
  • CTRL+ALT+L - Solution Explorer
  • F4 - Properties window
  • CTRL+ALT+G - Registered Servers explorer

Standard shortcut keys

Please note apart from the above mentioned shortcut keys here are some standard shortcut keys which work fine in SSMS:
  • CTRL+A - Select all the text in the current query window
  • CTRL+C - Copy text in the current query window
  • CTRL+V - Paste text in the current query window
  • CTRL+X - Cut text in the current query window
  • DEL - Delete text in the current query window
  • CTRL+P - Launch the print dialog box
  • CTRL+HOME - Top of the current query window
  • CTRL+END - End of the query window
  • CTRL+SHIFT+HOME - Select all the text from the current location to the beginning of the query window
  • CTRL+SHIFT+END - Select all the text from the current location to the end of the query window
  • ALT+F4 - Close the SSMS application
Display numbers:


Control+G: to go to the desired line number and display line number in the query editor window.


Control+E: Executes the query. Select the query you want to execute and then press Control+E.
Control+L: Cost Estimation. Select the query you want to execute and then press Control+L.
Control+R: Hide/show the Result Pane.
Control+N: New Query Window.
Control+Shift+U: Convert text to UPPERCASE. Select the text you want to convert and then press Control+Shift+U.
Control+Shift+L: Convert text to lowercase. Select the text you want to convert and then press Control+Shift+L.
Control+Shift+Del: Clears the active query window. It clears the contents of the active window.
Control+U: Use database. Press Control+U, then your mouse focus will go to the database dropdown as in the following.


Control+T: display's the result in text format. Press Control+T and then execute the query. It will show the result as follows.
Control + D: To display the result in Grid format. And to display the result in grid (default format) press Control+D and then execute the query.
Control+ Left/Right Arrow: To move the cursor to the next word.
Control+Shift+ Left/Right Arrow: To move and select the next word.
Alt+Shift+ Left/Right/Down Arrow: To select the text that is usually not possible using the mouse as in the following.
Alt+F1 To view the table definition. Select the table name and then press Alt+F1.
View SQL Server Version : SELECT @@Version AS 'SQL Server Version'

 SHIFT+ALT+S: include the client statistics with the query results
F10 Debugging query



Ctrl + M:Include actual execution plan
Ctrl + K & Ctrl + C; Ctrl + K & Ctrl + U:Comment and uncomment lines of code
Shift+Alt+Enter: Toggle the full-screen display





















Alt+Break: Cancel the executing query
Ctrl+Enter: Insert a blank line above the cursor
Ctrl+Shift+Enter: Insert a blank line below the cursor

No comments:

Post a Comment