To add a routine, double-click the Add
Routine icon in the Physical
Schemata section of the MySQL Model
page. The default name of the routine is
routine1. If a routine with this name already
exists, the new routine is named routine2.
Adding a new routine automatically opens the routine editor docked at the bottom of the application. For information about using the routine editor, see Section 7.7.4.1.2, “The Routine Editor”.
Right-clicking a routine opens a pop-up menu with the following items:
Rename
Cut
'routine_name'
Copy
'routine_name'
Paste
Edit Routine...
Edit in New Window...
Copy SQL to Clipboard
Delete
'routine_name'
The Edit Routine... item opens the routine editor.
The cut and paste items are useful for copying routines between different schemata.
Deleting the code for a routine from the Routines tab of the Routine Group Editor results in removal of the routine object from the model.
To remove a routine from a routine group, use the controls on the Routine Group tab of the Routine Group Editor.
The action of the delete option varies depending upon how you have configured MySQL Workbench. For more information, see Section 5.4.5, “The Model Tab”.
To invoke the routine editor, double-click a routine in the
Physical Schemata section on the
MySQL Model page. This opens the routine
editor docked at the bottom of the application. Any number of
routines may be open at the same time. Each additional routine
appears as a tab at the top of the routine editor.
Routine and Privileges tabs appear at the bottom of the routine editor. Navigate between different tabs using the mouse or from the keyboard by pressing Control+Alt+Tab.
Use the Routine tab of the routine editor to perform the following tasks:
Rename the routine using the Name field.
Enter the SQL to create a routine using the SQL field.
The Privileges tab of the routine editor functions in exactly the same way as the Privileges tab of the table editor. For more information, see Section 7.7.1.3.9, “The Privileges Tab”.
Privileges are available only in the Standard Edition of MySQL Workbench.

User Comments
Add your own comment.