Example of MySQL stored procedure begin END Compound statement usage

Source: Internet
Author: User

Example of MySQL stored procedure begin END Compound statement usage

Begin_label:] BEGIN

[Statement_list]

End [End_label]

Stored subroutines can use the begin ... End Compound statement to contain multiple statements. Statement_list represents a list of one or more statements. Within Statement_list, each statement must end with a semicolon (;).

Compound statements can be marked. Unless Begin_label exist, End_label cannot be given, and if both exist, they must be the same.

Note that the optional [NOT] atomic clause is not currently supported. This means that a storage point with no interaction at the beginning of the instruction block is set, and that the BEGIN clause used in the context has no effect on the current interaction action.

Using multiple statements requires the client to send a query string containing the statement delimiter. This symbol is handled using the delimiter command on the command-line client. Change the end of the query delimiter (e.g. change to//) to make; Can be used in subroutine bodies.

Note : Please pay attention to the triple programming Tutorials section for more wonderful articles .

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.