MySQL Tutorial/Procedure Function/Begin End

Материал из SQL эксперт
Перейти к: навигация, поиск

BEGIN and END Statements

BEGIN and END statements group statements in procedures with more than one SQL statement.

Declarations can be made only within a BEGIN ... END block.

You can define a label for the block to clarify your code.

The labels must match exactly.



   <source lang="sql">

yourLableName: BEGIN <SQL statement>; <SQL statement>; END yourLableName</source>