HomeMySQL Page 4 - A DIY Approach to Stored Procedures in MySQL
Alter Procedure and Conclusion - MySQL
If you have avoided using MySQL in the past due to its lack of support for stored procedures, here’s good news. The latest developer release of MySQL (MySQL 5.0) supports stored procedures. Drum roll, please! If you want to jog your memory before you begin to create those cretins or want to know more about them, read on. In this article, we'll learn what stored procedures are and create our first stored procedure in MySQL and learn some useful commands while we're at it.
The alter procedure statement may be used to change the name of a stored procedure or change its other characteristics such as comments or security associated with it.
mysql> ALTER PROCEDURE PARTPRICE NAME partprice; Query OK, 0 rows affected (0.00 sec)
Conclusion
There –- now you know how to create a stored procedure -- you are only limited by your imagination and the MySQL documentation. However, stored procedures in MySQL are still young and in the alpha stage. So, don’t be surprised if you come across bugs; after all, this is only a sneak preview. If you do encounter bugs, please check at http://bugs.mysql.com. If your bug is not listed, please add it there for the benefit of others.
In this article, we learned how to create a simple stored procedure and run it from the command prompt. For more information on stored procedures in MySQL, visit the MySQL website at: http://dev.mysql.com/doc/mysql/en/Stored_Procedures.html.