Sql Prompt Snippets 快捷键学习

File    Description
------- -------------------------------------------------------------------------------
ac      ALTER COLUMN
af      ALTER FUNCTION
ap      ALTER PROCEDURE
at      ALTER TABLE
ata     Add column
atac    Modify column 
atd     Drop column
atdc    Drop constraint
atdt    Disable a trigger on table
atdta   Disable all triggers on table
atet    Enable a trigger on table 
ateta   Enable all triggers on table
be      BEGIN...END
bt      BEGIN TRANSACTION
ccc     CREATE CELL CALCULATION fragment
cci     Create non-unique clustered index
cdb     CREATE DATABASE
cdbsnap Create a database snapshot
citf    Create inline table-valued function
cj      CROSS JOIN fragment
cl      Create a new SQL Server login
clrp    Create a CLR stored procedure
cni     Create non-unique nonclustered index
cp      Create a stored procedure
cseq	Create a sequence (start, end, optional: cycle, cache)
csf     Create scalar function
ct      Create a table
cte     Create a new common table expression
ctf     Create table-valued function
ctr     Commit transaction
ctt     Create temp table (drops if exists)
cu      Create a database user
cuci    Create unique clustered index
cuni    Create unique nonclustered index
curff   Boilerplate code for fast-forward read-only cursor
cv      Create a view
cw      CASE WHEN
dd      Drop a database
df      DELETE FROM fragment
dfn     Drop a function
di      Drop an index
dl      Drop a login
dp      Drop a stored procedure
dseq	Drop a sequence
dt      Drop a table
du      Drop a user
dupk	Check for duplicated values on a column
dv      Drop a view
err     Inserts @@ERROR function call
fj      FULL JOIN fragment
foj     FULL OUTER JOIN fragment
gb      GROUP BY
gep		Grant Execute on procedures
git		Grant Insert on table
giust	Grant Insert, Select, Update on table
gst		Grant Select on table
gut		Grant Update on table
header  Template header for stored procedure
hhmm    string to HH:mm format
ifs     IF fragment
ii      INSERT INTO fragment
ij      INNER JOIN fragment
j       JOIN fragment
inn     IS NOT NULL fragment
is      Shortcut for INFORMATION_SCHEMA
isc     Column Information Grabber
isns    Wraps the currently selected column (text) in an ISNULL Function, with a default empty string (this is an inline selected text function)
isnn    Wraps the currently selected column (number) in an ISNULL Function, with a default to zero (this is an inline selected text function)
lin     Line
linn    Double line with space for text comment
lj      LEFT JOIN
lk      LIKE '% %' fragment
loj     LEFT OUTER JOIN fragment
mmddyyyy String to mmddyyyy format
mmddyyyyhhmm String to mmddyyyyhhmm format
mro     Retrieves information about 20 most recently created objects from database
neo     A word from one of our sponsors
num     Format a big number into a readable format
numc    Nicely formatted COUNT(*) as numRows
nvseq	Next value for a sequence
ob      ORDER BY
rj      RIGHT JOIN fragment
rnum    ROW_NUMBER() OVER () fragment
roj     RIGHT OUTER JOIN fragment
rt      Rollback transaction
san     Change the current ANSI_NULLS setting
scf     Count number of records returned by query, formatted nicely
sd      SELECT DISTINCT
setvar  SQL CMD setvar fragment
smf     SELECT SUM() FROM
sph     Execute sp_help
spt     Execute sp_helptext
sqi     Change the current QUOTED_IDENTIFIER setting
ss0     SELECT TOP 0 * FROM
ssf     SELECT * FROM fragment
ssf2    SELECT * FROM fragment, formatted nicely with tabs and newline.
sst     SELECT TOP 1000 * FROM
st100   SELECT top 100 rows
sxa     Change the current XACT_ABORT setting
tc      TRY ... CATCH fragment
today   CAST(GETDATE() as date) fragment
trim    Trim a string: LTRIM(RTRIM($CURSOR$))
trims   Wrap selected text in LTRIM(RTRIM($SELECTEDTEXT$))
uci     Unique Clustered Index
w2      Execute sp_who2
wdc     WITH (DATA_COMPRESSION = PAGE) fragment
wt      WITH (TABLOCK) fragment
xpfd    Retrieve free space on all fixed drives
yell    Vent your frustration
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值