homehome previousprevious nextnext
 
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

  • Select anywhere on the object pane.
  • Click the New StoredProc from the object pane toolbar.
    or
  • Right-click and select New StoredProc from the popup menu.
  • Edit stored procedure/function properties on the appropriate tabs of the Stored Procedure Designer.
  • Hint: To create new stored procedure/function you can also right-click the Stored Procedure node of the navigation pane and select the New StoredProc from the popup menu.

To create a new stored procedure/function with modification as one of the existing stored procedure/function

  • Select the stored procedure/function for modifying 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.
  • Modify stored procedure/function properties on the appropriate tabs of the Stored Procedure Designer.
  • Click Save As.
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.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright 1999 - 2007. PremiumSoft TM CyberTech Ltd All rights reserved
MySQL TM is a trademark of MySQL AB in the United States and other countries.