Monday, August 07, 2006

Renaming a stored procedure

Yesterday night I was working to create stored procedures to simplify my work to manage hierarchical data in MySQL. I had seen Mike Hillyer's excellent presentation at MySQL UC and truly enjoyed it. BTW, he has put up a nice guide on dev.mysql.com in case you are interested (links below).

While working with the stored procedures (will post them soon) I wanted to rename one of the stored procedure I created. So I searched for it and found that we should be able to rename it using the ALTER PROCEDURE command however I couldn't figure out the exact syntax to rename it. I did drop the SP and recreated it but wanted to find out how can I rename an existing SP. Any ideas, tips, hints are appreciated.

2 comments:

pabloj said...

Of course there isn't, see feature request number 9588 (http://bugs.mysql.com/bug.php?id=9588)

Frank said...

Thanks for pointing that out pabloj.

Funny thing is that on DevShed, this page (http://www.devshed.com/c/a/MySQL/A-DIY-Approach-to-Stored-Procedures-in-MySQL/3/) has an example of renaming a stored procedure which obviously isn't right.

Thanks, again
Frank