SQL Prompt代码段

在编写SQL时,经常需要输入全部SQL命令,今天尝试了SQLPrompt,可以提高开发效率,例如:直接输入“ssf”,Tab键,就可以得到 "SELECT * FROM "命令,把SQLPrompt其他代码段也分享给大家。

PS:不仅仅是再SQLPrompt使用,还有Azure Data Studio,都可以尝试

缩写

代码段

afALTER FUNCTION fragment
atALTER TABLE fragment
atacModify column
ataAdd column
atdcDrop constraint
apALTER PROCEDURE fragment
atdDrop column
atdtaDisable all triggers on table
atdtDisable trigger
cciCreate non-unique clustered index
atetaEnable all triggers on table
cdbCreate database
beBEGIN...END block
atetEnable trigger
cdbsnapCreate database snapshot
btBegin transaction
chkCreates an extended event session, runs the code you want to test, extracts the output and then stops the session
clrpCreate CLR stored procedure
cjCROSS JOIN fragment
cniCreate non-unique nonclustered index
citfCreate inline table-valued function
clCREATE SQL Server login
csfCreate scalar function
cteWITH cte fragment
cpCreate stored procedure
ctCreate table
ctfCreate multi-statement table-valued function
ctrCommit transaction
cuciCreate unique clustered index
cvCreate view
cuniCreate unique nonclustered index
ddDrop database
cuCreate database user
curffFast-forward read-only cursor
dfDELETE FROM fragment
dlDrop login
dfnDrop function
diDrop index
dpDrop stored procedure
eataAdd column (enhanced edition)
dvDrop view
duDrop user
err@@ERROR function call
fonEnable formatting from this point onwards
fjFULL JOIN fragment
fojFULL OUTER JOIN fragment
dtDrop table
foffDisable formatting from this point onwards
gbGROUP BY fragment
iiINSERT INTO fragment
isINFORMATION_SCHEMA fragment
ifsIF fragment
ijINNER JOIN fragment
ljLEFT JOIN fragment
lojLEFT OUTER JOIN fragment
mroRetrieve 20 most recently created objects
rjRIGHT JOIN fragment
obORDER BY fragment
rojRIGHT OUTER JOIN fragment
rtRollback transaction
sanChange the current ANSI_NULLS setting
scfCount number of records returned by query
ssfSELECT * FROM fragment
sphExecute sp_help
st100SELECT top 100 rows
sqiChange the current QUOTED_IDENTIFIER setting
sptExecute sp_helptext
sxaChange the current XACT_ABORT setting
timingsWraps a simple timings test harness around the selected code
w2Execute sp_who2
tcTRY ... CATCH fragment
tvcAutomatically create a table variable (or temp table) in which to store the results of (for example) executing a stored procedure, function or query
xpfdRetrieve free space on all fixed drives

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值