Skip to content

Latest commit

 

History

History
43 lines (31 loc) · 2.06 KB

File metadata and controls

43 lines (31 loc) · 2.06 KB
title Insert Transact-SQL Snippets
ms.custom seo-lt-2019
ms.date 06/13/2017
ms.prod sql-server-2014
ms.reviewer
ms.technology database-engine
ms.topic conceptual
helpviewer_keywords
IntelliSense [SQL Server], snippets
Transact-SQL snippets, code
snippets [Transact-SQL], how to insert
ms.assetid d66c96f4-2e84-4d79-9bfd-3635fdd98425
author MightyPen
ms.author genemi
manager craigg

Insert Transact-SQL Snippets

A [!INCLUDEtsql] code snippet is a template you can use as a starting point when writing new [!INCLUDEtsql] statements in the [!INCLUDEssDE] Query Editor.

Inserting Snippets

You can use the Insert Snippet menu to open a categorized list of snippets to choose from.

[!INCLUDEtsql] 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 [!INCLUDEtsql] statement. For more information, see Complete Transact-SQL Snippets.

Inserting a Snippet by Using the Insert Snippet Menu

  1. In the [!INCLUDEssDE] Query Editor window, put the cursor where you want to insert the [!INCLUDEtsql] 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