The DECLARE statement is used to define various items local to a routine: local variables (see Variables in Stored Procedures), conditions and handlers (see Conditions and Handlers) and cursors (see Cursors). SIGNAL and RESIGNAL statements are not currently supported.
DECLARE may only be used inside a BEGIN ... END compound statement and must be at its start, before any other statements.