Stored routines (procedures and functions) are supported in MySQL 5.0. A stored routine is a set of SQL statements that can be stored in the server. Once this has been done, clients do not need to keep reissuing the individual statements but can refer to the stored routine instead.
Just simply click to open an object pane for Function. A right-click displays the popup menu or using the object pane
toolbar below, allowing you to create new, edit and delete the selected
function/procedure.
Create Function/Procedure
To create a new function/procedure
- Select anywhere on the object pane.
- Click the
New Function from the object pane toolbar.
or - Right-click and select
New Function from the popup menu.
- Edit function/procedure properties on the appropriate tabs of the Function/Procedure Designer.
Hint: To create new function/procedure
you can also right-click the Function node of the navigation pane
and select the New Function from the popup
menu.
To create a new function/procedure with modification as one of the existing function/procedure
- Select the function/procedure for modifying in the navigation pane/object pane.
- Right-click and select the
Design Function from the popup menu or simply double-click the function/procedure.
or - Click the
Design Function from the object pane toolbar.
- Modify function/procedure properties on the appropriate tabs of the Function/Procedure Designer.
- Click
Save As.
To edit the existing function/procedure (manage its definition etc)
- Select the function/procedure for editing in the navigation pane/object pane.
- Right-click and select the
Design Function from the popup menu or simply double-click the function/procedure.
or - Click the
Design Function from the object pane toolbar.
- Edit function/procedure properties on the appropriate tabs of the Function/Procedure Designer.
To change the name of the function/procedure
- Select the function/procedure for editing in the navigation pane/object pane.
- Right-click and select the Rename from the popup menu.
Run Function/Procedure
To run a function/procedure in the navigation pane/object pane
- Select the function/procedure for executing in the navigation pane/object pane.
- Click the
Execute Function from the object pane toolbar.
or - Right-click and select
Execute Function from the popup menu.
- View/edit the returned data on the Result tab.
To run a function/procedure in the Function/Procedure Designer
- Create a new function/procedure/open the existing function/procedure.
- Click
Run.
- View/edit the returned data on the Result tab.
Delete Function/Procedure
To delete a function/procedure
- Select the function/procedure for deleting in the navigation pane/object pane.
- Right-click and select the
Delete Function from the popup menu.
or - Click the
Delete Function from the object pane toolbar.
- Confirm deleting in the dialog window.
Achieve Function/Procedure Information
To achieve a function/procedure information
- Select the function/procedure in the navigation pane/object pane.
- Right-click the selected function/procedure and choose Function Information from the popup menu.
or - Choose View -> Object Information in the main menu.