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