--- title: "Insert Transact-SQL Snippets | Microsoft Docs" ms.custom: "" ms.date: "03/14/2017" ms.prod: "sql" ms.prod_service: "sql-tools" ms.service: "" ms.component: "ssms-scripting" ms.reviewer: "" ms.suite: "sql" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "article" helpviewer_keywords: - "IntelliSense [SQL Server], snippets" - "Transact-SQL snippets, code" - "snippets [Transact-SQL], how to insert" ms.assetid: d66c96f4-2e84-4d79-9bfd-3635fdd98425 caps.latest.revision: 7 author: "MightyPen" ms.author: "genemi" manager: "craigg" ms.workload: "Inactive" monikerRange: ">= aps-pdw-2016 || = azuresqldb-current || = azure-sqldw-latest || >= sql-server-2016 || = sqlallproducts-allversions" --- # Insert Transact-SQL Snippets [!INCLUDE[appliesto-ss-asdb-asdw-pdw-md](../../includes/appliesto-ss-asdb-asdw-pdw-md.md)] A [!INCLUDE[tsql](../../includes/tsql-md.md)] code snippet is a template you can use as a starting point when writing new [!INCLUDE[tsql](../../includes/tsql-md.md)] statements in the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor. ## Inserting Snippets You can use the **Insert Snippet** menu to open a categorized list of snippets to choose from. [!INCLUDE[tsql](../../includes/tsql-md.md)] snippets contain replacement points: text that suggests the syntax relevant to that point. For example, the CREATE TABLE snippet has replacement points for elements such as the table name, column names, and column data types. After inserting the snippet, you must change the replacement text to form a valid [!INCLUDE[tsql](../../includes/tsql-md.md)] statement. For more information, see [Complete Transact-SQL Snippets](../../relational-databases/scripting/complete-transact-sql-snippets.md). #### Inserting a Snippet by Using the Insert Snippet Menu 1. In the [!INCLUDE[ssDE](../../includes/ssde-md.md)] Query Editor window, put the cursor where you want to insert the [!INCLUDE[tsql](../../includes/tsql-md.md)] snippet. 2. Launch the snippet picker tooltip in one of three ways: - Press CTRL+K, CTRL+X. - On the **Edit** menu, point to **IntelliSense**, then click **Insert Snippet**. - Right-click the mouse and then select the **Insert Snippet** command from the shortcut menu. 3. Double-click the snippet, or select the snippet from the snippet picker and then press TAB or ENTER. ## See Also [Insert Surround-with Transact-SQL snippets](../../relational-databases/scripting/insert-surround-with-transact-sql-snippets.md)