Have you ever used code snippet feature in Visual Studio? Aren’t they very useful?
What are code snippets?
Code Snippets are reusable code templates those help to write code faster.
What are Transact SQL code snippets?
“A Transact-SQL code snippet is a template containing the basic structure of a Transact-SQL statement or block. You can use snippets as a starting point when adding statements in the Database Engine Query Editor. You can insert the pre-defined snippets supplied with SQL Server, or create your own.” —MSDN
We’ll discuss about how we can create a Transact SQL code snippet of our own on a later blog post. For now, we’ll see how we can use them.

- Right-click on the query window and click "Insert Snippet…"
- Use keyboard shortcuts CTRL+K, CTRL+X

Then, choose the appropriate category and then the appropriate template to insert it in to your query window.

Hadshana KamalanathanPosted Jul 16, 2018, 8:26 PM
Thank you for sharing
Satyaprakash SamantarayPosted Nov 16, 2017, 4:55 AM
Nice one..............