You can create & use templates in SSMS for such requirement, see
Template Explorer
Use templates in SQL Server Management Studio
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Is there some way to quickly type common SQL, like "select * from x where y order by z"?
I often need to type this multiple times a day into a query editor window. A keyboard shortcut would save a lot of time (cumulatively)
I don't want to open a file with a template; the number of clicks and key presses is as much as typing the code, and it distracts from my train of thought
I can't use a Query Shortcut as that executes code; it doesn't type it on screen
You can create & use templates in SSMS for such requirement, see
Template Explorer
Use templates in SQL Server Management Studio
Hi @John Hunter ,
You can follow below steps to create T-SQL query shortcut in SSMS. SSMS -> Tool-> Options;
Please refer to this blog Creating T-SQL Query Shortcuts in SQL Server Management Studio(SSMS) to get detail steps.
>I can't use a Query Shortcut as that executes code; it doesn't type it on screen
Sorry for missing this sentence. If that, copy these T-SQL in one text, then CTRL+C and CTRL +V also very quickly.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".