Snippets Generator

Snippets Generator is an application that enables developers to generate T-SQL snippets for SQL Server 2012 or later. It supports templates and carries out tasks very fast.

features download screenshots online help why we built it



* Snippets Generator is a Free Product offered with respect to the SQL Server community.


Why We Built Snippets Generator

Code snippets is a handy way of reusing pieces of code you frequently need. As in many development environments, SQL Server 2012 or later supports code snippets. With Snippets Generator you can create or modify existing snippet files easily, using an intelligent GUI. You do not need to know XML, etc. in order to do this. You just use Snippets Generator, enter the T-SQL script, generate the snippet file and that's it! Right after that you can just import the snippet into SQL Server's Management Studio.


App Screenshot
Create & Modify Snippets

You can create new snippets but also modify existing SQL Server snippets.

Basic Syntax Highlighting

Basic syntax highlighting can help you write T-SQL easier and be more producting during the snippet creation or modification process..

Snippets Template Library

With the snippets template library, you can use templates of commonly used T-SQL scripts in order to help you create your SQL Server snippet easier. Also you can save snippets as custom templates.

Code Formatting

Basic code formatting in also available in the snippet's T-SQL code editor.

Download Snippets Generator

Version: 3.1

What's new:

  • - You can now save your snippets as templates
  • - Check for updates
  • - Reset formatting
  • - GUI enhancements

You can download Snippets Generator from the below download links:


System Requirements:


* Supported SQL Server versions: 2012 or later.

Total Downloads: 1182


Online Help

Snippets Generator allows the user to easily create/modify T-SQL snippets for SQL Server! You can create a snippet from scratch or by using snippet templates.

Snippets Generator - Main Screen
Figure 1: Main Screen of Snippets Generator.

Creating a Snippet
You can generate T-SQL snippets in five ways:

  • - By writing the T-SQL script from scratch.
  • - By pasting the script from the clipboard.
  • - By dragging and dropping a text or sql file onto the T-SQL text box.
  • - By using an existing T-SQL snippet template from Snippet Templates Library and complete the script based on the template.
  • - By modifying an existing script.

Importing a Snippet in SQL Server Management Studio (SSMS)
After you generate the snippet, you can import it in SQL Server Management Studio 2012 or later using the following procedure:

  1. Create a new folder and save the generated snippet file(s) there.
  2. In SSMS, click on "Tools" and then select "Code Snippet Manager".
  3. Click on the "Add" button and select to add the folder you earlier created and which contains the generated snippet file(s).
  4. Click on the "OK" button.
  5. That's it! You can now start using your own T-SQL code snippets!

Modifying an Existing Snippet
You can modify snippets by navigating to File --> Open Snippet. When you open a snippet, its data is automatically retrieved and imported into the relevant fields. Then you can modify the snippet and re-generate it.

Setting a Default Author Name new
You can set a default author name by by navigating to Configure --> Set Default Author or by pressing the keys Ctr + D.

Formatting the Snippet Text and Basic Syntax Highlightingnew
You can format the snippet text and apply basic syntax highlighting by using the shortcuts just right below the snippet code's box. Available actions:

  • Parse
  • Word Wrap
  • Basic Syntax Highlighting
  • Increase/Decrease Font Size

Explanation of Fields

  • - Title: The title of your snippet as it will appear in SSMS snippet manager.
  • - Description: A short description of what your snippet does.
  • - Author: Name of the person who authored the snippet.
  • - Snippet Type: The type of the snippet.
    • -- Expansion: A new block of T-SQL statements.
    • -- SurroundsWith: A T-SQL statement which surrounds other statements i.e. Begin..End.
  • - T-SQL Script: The snippet code.