A SQL code snippet is a fragment of reusable code or statement that can be added or edited by a user. To view the snippets, navigate to the SQL Complete menu and select Snippets Manager.
To invoke snippets, use one of the following options:
To commit a snippet, do either of the following:
After inserting snippets, it is possible to configure the parameters of the snippet. For instance, you inserted the CTE (Common Table Expression) snippet:
To configure the parameters, in the CTE name placeholder, enter “query” and then press Tab to enter the schema name. You can enter only initial letters like “hr”, and thanks to the CamelHumps feature, “HumanResources” will be automatically selected in the suggestion list.
Press Tab to enter the table name. You can type the first symbols like “emp” and then choose an “Employee” table from the list, press the Enter key.
To discard the insertion and exit the insert mode of snippet parameters, press Esc.
To learn more about creating snippets and using placeholders, see How to manage SQL snippets.
SQL Complete expands the built-in capabilities of SSMS template and snippet functionality and helps to make the usage of snippets more flexible.
The added value of SQL Complete includes but is not limited to a rich variety of replacement points (introduced via placeholders), customizable sharing options, easy creation, and reuse of custom snippets.