Usage example of the BEGINEND compound statement in the mysql Stored Procedure

Source: Internet
Author: User
Examples of begin_label:] BEGIN [statement_list] END [end_label] using the BEGIN... END compound statement in the mysql stored procedure can contain multiple statements. Statement_list indicates the list of one or more statements. Each statement in statement_list must end with a semicolon.

Examples of begin_label:] BEGIN [statement_list] END [end_label] using the BEGIN... END compound statement in the mysql stored procedure can contain multiple statements. Statement_list indicates the list of one or more statements. Each statement in statement_list must end with a semicolon.

Mysql Stored Procedure in END compound statement usage example

Begin_label:] BEGIN

[Statement_list]

END [end_label]

You can use the in... END compound statement to store subprograms to contain multiple statements. Statement_list indicates the list of one or more statements. Each statement in statement_list must end with a semicolon.

Compound statements can be marked. Unless begin_label exists, end_label cannot be given, and if both exist, they must be the same.

Note that the optional [NOT] ATOMIC clause is NOT supported yet. This means that no interaction storage point is set at the beginning of the instruction block, and the BEGIN clause Used in the context does not affect the current interaction action.

To use multiple statements, the client must be able to send query strings containing statement delimiters. This symbol is processed by the delimiter command on the command line client. Change the end Separator of the query (for example, change to //) so that it can be used in the subprogram body.

Note: More exciting articles, please pay attention to SanlianProgramming TutorialTopic.

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.