0% found this document useful (0 votes)
21 views

SQLPrompt QuickReferenceGuide

The document provides shortcuts and tips for SQL Server Management Studio. It lists shortcuts for navigation, formatting code, renaming variables, and more. It also lists snippets for common SQL statements and tips for code productivity, formatting, navigation, and using suggestions.

Uploaded by

Dung Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

SQLPrompt QuickReferenceGuide

The document provides shortcuts and tips for SQL Server Management Studio. It lists shortcuts for navigation, formatting code, renaming variables, and more. It also lists snippets for common SQL statements and tips for code productivity, formatting, navigation, and using suggestions.

Uploaded by

Dung Nguyen
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

QUICK REFERENCE GUIDE

Formatting & refactoring shortcuts

Navigation shortcuts

Code-completion shortcuts

Rename variables/aliases

F2

Script object as ALTER

F12

Show suggestions

Ctrl+Space

Format SQL

Ctrl+K, Ctrl+Y

Execute current statment

Shift+F5

Refresh suggestions

Ctrl+Shift+D

Uppercase keywords

Ctrl+B, Ctrl+U

Select in Object Explorer

Ctrl+F12

Code suggestions on/off

Ctrl+Shift+P

Expand wildcards

Ctrl+B, Ctrl+W

Tab history

Ctrl+Q

Switch to/from column picker

Ctrl+Left / Ctrl+Right

Qualify object names

Ctrl+B, Ctrl+Q

Summarize script

Ctrl+B, Ctrl+S

Ctrl+Up / Ctrl+Down

Add/remove square brackets

Ctrl+B, Ctrl+B

Ctrl+B, Ctrl+F

Insert semicolons

Ctrl+B, Ctrl+C

Find unused variables


and parameters

Move up/down suggestions


box filters

Encapsulate as new
stored procedure

Ctrl+B, Ctrl+E

Top snippets
SELECT * FROM

Snippet placeholders
ssf

INNER JOIN

ij

INSERT INTO

ii

$DATE$

Inserts the current date


You can specify a custom date format, for example $DATE(MM/dd/yyyy)$

$TIME$

Inserts the current time

ALTER PROCEDURE

ap

ORDER BY

ob

$USER$

Inserts the name of the connected user

LEFT OUTER JOIN

loj

$PASTE$

Inserts the contents of the clipboard

BEGIN/END

be

$MACHINE$

Inserts the name of the machine running SQL Prompt

st100

$CURSOR$

Specifies the cursor position when the snippet is inserted

CREATE PROCEDURE

cp

$SERVER$

Inserts the name of the connected SQL server

DELETE FROM

df

$DBNAME$

Inserts the name of the connected database

GROUP BY

gb

$SELECTIONSTART$

Selects a block of the snippet text when the snippet is inserted

CREATE TABLE

ct

$SELECTIONEND$

SELECT TOP 100 * FROM

You can specify a custom time format, for example $TIME(HH:mm:ss)$

Code productivity tips

Formatting & refactoring tips

Tab history tips

Navigation tips

Suggestions can be matched by parts or first


letters of names

SQL formatting can be configured to your


preferred style, in Options > Styles

Search through all your open and recently


closed scripts

Script objects as ALTER straight from query


windows (F12)

Mid-string suggestions can also be helpful if


you remember part of an object name

Wildcards can be expanded directly from the


query window

Remove all tabs older than a specific tab, or


close them individually

Use the object definition box on columns to


see column dependencies

The column picker makes it easier to choose


columns for your queries

Formatting and refactoring commands can


also be applied to selections

Rename a closed tab for easier retrieval

Find all the invalid objects in your database,


via the menu

Type less using code snippets. Add your


own and share them using your favorite file
sharing service (e.g. Dropbox).

Smart rename lets you rename objects and


update all references to them

Open to restore tabs from your previous


session automatically

You might also like