| Stored Procedures/Functions
Stored routines (procedures and functions) are supported in MySQL 5.0. A
stored procedure 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 procedure instead.
Just sample click to open an object pane for Stored
Procedure. A right-click displays the popup menu or using the object pane
toolbar below, allowing you to create new, edit and delete the selected stored
procedure.

Create Stored Procedure/Function
To create a new stored procedure/function
To create a new stored procedure/function with the same properties as one of
the existing stored procedure/function has (using drag and drop method)
| Apply to: |
current database {same connection} |
- Select the stored procedure/function(s) for copying in the navigation
pane/object pane.
- Right-click and drag the chosen stored procedure/function(s) to the
target location.
- Select one of the following options:
- Copy here (Structure and Data)
- Copy here (Structure only)
- Move here
- Cancel
- The newly created stored procedure/function(s) will be named as "stored
procedure/functionname_copy".
| Apply to: |
different database {same connection} |
| |
different database {different connection} (Data
Transfer tool will be activated) |
- Select the stored procedure/function(s) for copying in the object
pane.
- Drag and drop the chosen stored procedure/function(s) to the target
database.
- Select one of the following options:
- Copy here (Structure and Data)
- Copy here (Structure only)
- Cancel
Edit Stored Procedure/Function
To edit the existing stored procedure/function (manage its definition etc)
- Select the stored procedure/function for editing in the navigation pane/object
pane.
- Right-click and select the
Design StoredProc
from the popup menu or simply double-click the stored procedure/function.
or
- Click the
Design StoredProc
from the object pane toolbar.
- Edit stored procedure/function properties on the appropriate tabs of
the Stored Procedure Designer.
To change the name of the stored procedure/function
- Select the stored procedure/function for editing in the navigation pane/object
pane.
- Right-click and select the Rename from the popup menu.
Run Stored Procedure/Function
To run a stored procedure/function
- Create a new stored procedure/function/open the existing stored procedure/function.
- Click
Run.
- View/edit the returned data on the Result
tab.
Delete Stored Procedure/Function
To delete a stored procedure/function
- Select the stored procedure/function for deleting in the navigation pane/object
pane.
- Right-click and select the
Delete StoredProc
from the popup menu.
or
- Click the
Delete StoredProc
from the object pane toolbar.
- Confirm deleting in the dialog window.
Achieve Stored Procedure/Function Information
To achieve a stored procedure/function information (parameter, security,
return type and DDL, etc)
- Select the stored procedure/function in the navigation pane/object pane.
- Right-click the selected stored procedure/function and choose StoredProc Information from the popup menu.
|