For mysql annotations, see

Source: Internet
Author: User

For mysql annotations, see mysql annotation classification: www.2cto.com 1. Start from the end of the line with the '#' character. 2. From the '--' sequence to the end of the row. Note that the comment style of '--' must be followed by at least one space character (such as space, tab, line break, and so on ). This syntax is slightly different from the standard SQL comment syntax, which will be discussed in 1.8.5.7, "'--' as the comment start mark. Note: spaces are required to prevent issues related to the Automatic Generation of SQL queries. It uses a code similar to the following, where, it is automatically "!". Payment !" Insert "payment" value: UPDATE account SET credit = credit -! Payment! Consider what will happen if the value of "payment" is negative, for example, "-1: UPDATE account SET credit = credit -- 1 in SQL, "credit -- 1" is a valid expression. However, if "-- 1" is interpreted as a comment, some expressions are discarded. The result is that the expression has different meanings than expected. UPDATE account SET credit = credit this statement does not make any changes to the value! This indicates that the comments starting with "--" may have serious consequences. Www.2cto.com 3. From/*. The end sequence is not necessarily in the same row. Therefore, this syntax allows annotations to span multiple rows. Note :/*! 50001 drop table if exists 'count _ yysbh' */; 50001 indicates that IF the database version is 5.00.01 or later, "drop table if exists 'count _ yysbh" will be executed

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.