| title | Transact-SQL Code Snippets | Microsoft Docs | |
|---|---|---|
| ms.custom | ||
| ms.date | 03/14/2017 | |
| ms.prod | sql-non-specified | |
| ms.prod_service | sql-tools | |
| ms.service | ||
| ms.component | ssms-scripting | |
| ms.reviewer | ||
| ms.suite | sql | |
| ms.technology |
|
|
| ms.tgt_pltfrm | ||
| ms.topic | article | |
| ms.assetid | 12834855-535a-4102-8b19-5d18b4080926 | |
| caps.latest.revision | 5 | |
| author | MightyPen | |
| ms.author | genemi | |
| manager | craigg | |
| ms.workload | On Demand |
[!INCLUDEappliesto-ss-asdb-asdw-pdw-md] A [!INCLUDEtsql].code snippet is a template containing the basic structure of a [!INCLUDEtsql] statement or block. You can use snippets as a starting point when adding statements in the [!INCLUDEssDE] Query Editor. You can insert the pre-defined snippets supplied with SQL Server, or create your own.
| Task Description | Topic |
|---|---|
| Describes how to insert an existing snippet, such as a CREATE TABLE or SELECT snippet. | Insert Transact-SQL Snippets |
| Describes how to enclose a set of [!INCLUDEtsql] statements in a BEGIN, IF, or WHILE block. | Insert Surround-with Transact-SQL snippets |
| Describes how to finish building a complete [!INCLUDEtsql] statement or block after inserting a code snippet. | Complete Transact-SQL Snippets |
| Describes how to build your own custom snippets and add them to the set of SQL Server snippets. | Add Transact-SQL Snippets |