SQL SERVER – Query Analyzer Short Cut to display the text of Stored Procedure

This is quick but interesting trick to display the text of Stored Procedure in the result window. Open SQL Query Analyzer >> Tools >> Customize >> Custom Tab
type sp_helptext against Ctrl+3 (or shortcut key of your choice)

Press CTRL + T to enable the text view in result window.
Type any Stored Procedure name in your database, select the SP name and type Ctrl+4.

You will see the Stored Procedure text in the Result Window.

Reference: Pinal Dave (http://www.SQLAuthority.com)

About these ads

SQL SERVER – Query Analyzer Shortcuts

Download Query Analyzer Shortcuts (PDF)

Shortcut Function Shortcut Function
ALT+BREAK Cancel a query CTRL+SHIFT+F2 Clear all bookmarks
ALT+F1 Database object information CTRL+SHIFT+INSERT Insert a template
ALT+F4 Exit CTRL+SHIFT+L Make selection lowercase
CTRL+A Select all CTRL+SHIFT+M Replace template parameters
CTRL+B Move the splitter CTRL+SHIFT+P Open
CTRL+C Copy CTRL+SHIFT+R Remove comment
CTRL+D Display results in grid format CTRL+SHIFT+S Show client statistics
CTRL+Delete Delete through the end of the line CTRL+SHIFT+T Show server trace
CTRL+E Execute query CTRL+SHIFT+U Make selection uppercase
CTRL+F Find CTRL+T Display results in text format
CTRL+F2 Insert/remove bookmark CTRL+U Change database
CTRL+F4 Disconnect CTRL+V Paste
CTRL+F5 Parse query and check syntax CTRL+W Window selector
CTRL+G Go to line CTRL+X Delete
CTRL+H Replace CTRL+Z Undo
CTRL+I Index Tuning Wizard F1 Help for Query Analyzer
CTRL+K Display/hide execution plan F2 Move to next bookmark
CTRL+L Display execution plan F3 Repeat last search
CTRL+N New query window F4 Object Search
CTRL+O Connect F5 Execute a query
CTRL+P Print F6 Switch between query and result panes
CTRL+R Show/Hide results pane F8 Show/hide Object Browser
CTRL+S Save SHIFT+F1 Transact-SQL help
CTRL+SHIFT+0 Show options SHIFT+F2 Move to previous bookmark
CTRL+SHIFT+C Comment out code SHIFT+TAB Decrease indent
CTRL+SHIFT+DEL Clear the active Editor pane SHIFT+F6 Switch panes
CTRL+SHIFT+F Save results to file TAB Increase indent

Download the PDF

Reference: Pinal Dave (http://blog.SQLAuthority.com), MSDN