#Stored procedure and function ##Bulk delete stored procedure
delete from mysql.proc WHERE db LIKE 'yourDbName';
##mysqldump/backup stored procedure only
mysqldump -h... -u... -p... -n -d -t --routines --triggers --all-databases > MySQLStoredProc.sql
-n, --no-create-db Suppress the CREATE DATABASE ... IF EXISTS statement that
normally is output for each dumped database if
--all-databases or --databases is given.
-d, --no-data No row information.
--triggers Dump triggers for each dumped table.
(Defaults to on; use --skip-triggers to disable.)
-R, --routines Dump stored routines (functions and procedures).
More on stack overfollow ##Difference between procedures and functions The most general difference between procedures and functions is that they are invoked differently and for different purposes:
- A procedure does not return a value. Instead, it is invoked with a CALL statement to perform an operation such as modifying a table or processing retrieved records.
- A function is invoked within an expression and returns a single value directly to the caller to be 3. used in the expression. You cannot invoke a function with a CALL statement, nor can you invoke a procedure in an expression.