在编写SQL时,经常需要输入全部SQL命令,今天尝试了SQLPrompt,可以提高开发效率,例如:直接输入“ssf”,Tab键,就可以得到 "SELECT * FROM "命令,把SQLPrompt其他代码段也分享给大家。
PS:不仅仅是再SQLPrompt使用,还有Azure Data Studio,都可以尝试
缩写 | 代码段 |
af | ALTER FUNCTION fragment |
at | ALTER TABLE fragment |
atac | Modify column |
ata | Add column |
atdc | Drop constraint |
ap | ALTER PROCEDURE fragment |
atd | Drop column |
atdta | Disable all triggers on table |
atdt | Disable trigger |
cci | Create non-unique clustered index |
ateta | Enable all triggers on table |
cdb | Create database |
be | BEGIN...END block |
atet | Enable trigger |
cdbsnap | Create database snapshot |
bt | Begin transaction |
chk | Creates an extended event session, runs the code you want to test, extracts the output and then stops the session |
clrp | Create CLR stored procedure |
cj | CROSS JOIN fragment |
cni | Create non-unique nonclustered index |
citf | Create inline table-valued function |
cl | CREATE SQL Server login |
csf | Create scalar function |
cte | WITH cte fragment |
cp | Create stored procedure |
ct | Create table |
ctf | Create multi-statement table-valued function |
ctr | Commit transaction |
cuci | Create unique clustered index |
cv | Create view |
cuni | Create unique nonclustered index |
dd | Drop database |
cu | Create database user |
curff | Fast-forward read-only cursor |
df | DELETE FROM fragment |
dl | Drop login |
dfn | Drop function |
di | Drop index |
dp | Drop stored procedure |
eata | Add column (enhanced edition) |
dv | Drop view |
du | Drop user |
err | @@ERROR function call |
fon | Enable formatting from this point onwards |
fj | FULL JOIN fragment |
foj | FULL OUTER JOIN fragment |
dt | Drop table |
foff | Disable formatting from this point onwards |
gb | GROUP BY fragment |
ii | INSERT INTO fragment |
is | INFORMATION_SCHEMA fragment |
ifs | IF fragment |
ij | INNER JOIN fragment |
lj | LEFT JOIN fragment |
loj | LEFT OUTER JOIN fragment |
mro | Retrieve 20 most recently created objects |
rj | RIGHT JOIN fragment |
ob | ORDER BY fragment |
roj | RIGHT OUTER JOIN fragment |
rt | Rollback transaction |
san | Change the current ANSI_NULLS setting |
scf | Count number of records returned by query |
ssf | SELECT * FROM fragment |
sph | Execute sp_help |
st100 | SELECT top 100 rows |
sqi | Change the current QUOTED_IDENTIFIER setting |
spt | Execute sp_helptext |
sxa | Change the current XACT_ABORT setting |
timings | Wraps a simple timings test harness around the selected code |
w2 | Execute sp_who2 |
tc | TRY ... CATCH fragment |
tvc | Automatically create a table variable (or temp table) in which to store the results of (for example) executing a stored procedure, function or query |
xpfd | Retrieve free space on all fixed drives |