MySQL Reference Manual for version 4.0.18.

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

18.1.4 BEGIN ... END Compound Statement

 
[begin_label:] BEGIN
 statement(s)
END [end_label]

Stored routines may contain multiple statements, using a BEGIN ... END compound statement.

begin_label and end_label must be the same, if both are specified.

Please note that the optional [NOT] ATOMIC clause is not yet supported. This means that no transactional savepoint is set at the start of the instruction block and the BEGIN clause used in this context has no effect on the current transaction.

Multiple statements requires that a client is able to send query strings containing `;'. This is handled in the mysql command-line client with the delimiter command. Changing the `;' end-of-query delimiter (for example, to `|') allows `;' to be used in a routine body.



This document was generated by rdg (Feb 25 2004) using texi2html