8.4 中文镜像

MySQL 8.4 参考手册 · 中文镜像

正文为中文,英文原文默认隐藏。点击任意中文段落即可展开 / 收起对应英文原文。

打开官方英文原文 ↗

译文由机器翻译生成,仅供理解参考;有疑问请以官方英文原文为准。

中文点击中文段落可显示 / 隐藏英文原文本页译文覆盖 100%

15.6.3 DECLARE 语句15.6.3 DECLARE Statement

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

DECLARE 仅允许在 BEGIN ... END 复合语句,必须置于开头,排在其他语句之前。DECLARE is permitted only inside a BEGIN ... END compound statement and must be at its start, before any other statements.

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