The Snippets tab includes built-in, local, and shared custom snippets. The tab contains a select box with My Snippets for custom snippets that are saved in a file for the MySQL Workbench installation, built-in options titled DB Mgmt (Database Management), SQL DDL (SQL Data Definition Language), and SQL DML (SQL Data Manipulation Language), and Shared for shared snippets.
Shared snippets are saved the
.mysqlworkbench schema on the connected MySQL
server. Selecting "Shared" for the first time will request
permission for MySQL Workbench to create this shared
.mysqlworkbench schema. Users connected to
this MySQL server are allowed to create, edit, and use these
Shared snippets were added in MySQL Workbench 6.2.0.
Snippets may be given names, and these snippets can be viewed and edited from the Snippets tab. To load a snippet into the SQL Query area, either choose the Snippets Insert icon or right-click on the desired snippet and choose Insert. Double-click a snippet to open an edit context, to edit the snippet body or title. This example shows two snippets, with only the first having defined a name.