SQL Snippets

The topic provides information about SQL snippets.

Snippets Overview

A code snippet is a fragment of code or other text that can be added or edited by a user. To view all available snippets, click Snippets Manager… on the SQL Complete menu.

To insert a snippet, start typing the required statement, select the snippet you want to add within the Suggestion list and commit it. To modify the relevant parts of a snippet, press TAB and then ENTER or ESC to accept it.

The Commit snippets immediately option allows inserting a code snippet instantly after pressing Tab, without waiting for the suggestion box to appear.

To enable this option, click Options on the SQL Complete menu. In the Options dialog box, navigate to List Members and select Commit snippets immediately.

SQL Snippets*

The feature makes recurrent use of code fragments more comfortable and simple. With help of the SQL snippets, you can:

  • Insert code templates with Tab
  • Add/edit templates with the help of Snippets Manager
  • Add parameters to a template

Insering a Snippet

These features are available in the Standard edition of SQL Complete only.

Default Snippets Location

By default, all snippets are stored in a folder that is located at C:\ProgramData\Devart\dbForge SQL Complete\Snippets.

You can change the default location when editing an existing snippet or creating a new one by setting a new path in the Location field of Snippets Manager.