Supporting routines—stored procedures and functions
It took a while before phpMyAdmin started to include support for stored procedures and functions. The reason is that these are blocks of code (like a sub-program) that are kept as a part of the database. phpMyAdmin, being a web interface, is more oriented towards operations that are performed quickly using a mouse.
Nonetheless, phpMyAdmin has a few features that permit a developer to create such routines, save them, recall them to make some modifications, and delete them.
Procedures are accessed by a CALL
statement to which we can pass parameters (more details at http://dev.mysql.com/doc/refman/5.5/en/call.html). On the other hand, functions are accessed from SQL statements (for example, SELECT
), and are similar to other MySQL internal functions, thus returning a value.
The CREATE ROUTINE
and ALTER ROUTINE
privileges are needed to be able to create, see, and delete a stored procedure or function. The EXECUTE
privilege is needed to run the...