Spec-Zone.ru › MySQL 5.7

13.6.3 DECLARE Statement

The DECLARE statement is used to define various items local to a program:

  • Local variables. See Section 13.6.4, “Variables in Stored Programs”.

  • Conditions and handlers. See Section 13.6.7, “Condition Handling”.

  • Cursors. See Section 13.6.6, “Cursors”.

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.

© 2025 Oracle
Licensed under the GPLv2 License.
https://docs.oracle.com/cd/E17952_01/mysql-5.7-en/declare.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API