13.6.3 DECLARE Statement语句

The DECLARE statement is used to define various items local to a program:DECLARE语句用于定义程序的各种局部项:

DECLARE is permitted only inside a BEGIN ... END compound statement and must be at its start, before any other statements.只允许在BEGIN ... END复合语句中使用DECLARE,并且必须在其开始处,在任何其他语句之前。

Declarations must follow a certain order. 声明必须遵循一定的顺序。Cursor declarations must appear before handler declarations. 指针声明必须出现在处理程序声明之前。Variable and condition declarations must appear before cursor or handler declarations.变量和条件声明必须出现在游标或处理程序声明之前。