BEGIN ... END Compound statement Syntax
BEGIN [statement_list] END
BEGIN … END syntax is used for writing compound statements, which can appear within stored routines and triggers. A compound statement can contain multiple statements, enclosed by the BEGIN and END keywords.
statement_list represents a list of one or more statements. Each statement within statement_list must be terminated by a semicolon (;) statement delimiter. Note that statement_list is optional, which means that the empty compound statement (BEGIN END) is legal.
CREATE PROCEDURE sp1( IN inValue long ) BEGIN SET inValue = inValue + 1; INSERT INTO t1(f1) VALUES( inValue ); END