MySQL declare语句是在复合语句中声明变量的指令。主要用法如下

(1)Example with two DECLARE statements 

在过程中定义的变量并不是真正的定义,你只是在BEGIN/END块内定义了而已。

(2)Example with no DEFAULT clause and SET statement  没有默认子句和设定语句的例子。