Development tips, help, and suggestions for building performant websites
MySQL – Stored Routines (Procedures)
A living document covering MySQL stored routine aka procedures functionality.
Check which routines are stored:
select * from information_schema.ROUTINES
Execute a stored procedure:
call stored_procedure_name(arg1, (arg2...));
Add a stored procedure:
Best way to add a stored procedure is to create a .sql file with the contents of stored procedure then call mysql from shell cli.
mysql -u <user> -h <db-host> -p < /path/to/.sql
