MySQL Workbench can help get you started writing scripts that create stored procedures and functions. When you select the Create Stored Procedures or the Create Stored Funcions node, MySQL Workbench automatically generates some basic code for the routine, including: a CREATE PROCEDURE statement.
a DELIMITER statement.
BEGIN and END keywords.
all of the above.