Have you 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…
- Using keyboard shortcuts CTRL+K, CTRL+X
Then choose the appropriate category and then the appropriate template to insert it in to your query window.
Hopefully, you liked this tips. Please stay tuned to learn few more exciting tips in this series. Will love to hear from you. Thanks for reading 🙂