Description of MySQL statement comments and mysql statement comments
MySQL supports three annotation methods:
1. Start the '#' character from the end of the line.
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 ).
3. From the/* sequence to the */sequence following it. The end sequence is not necessarily in the same row. Therefore, this syntax allows annotations to span multiple rows.
The following example shows three styles of Annotations:
// In mysql, how to write the comment statement mysql> SELECT 1 + 1; # This comment ends until the end of the line mysql> SELECT 1 + 1; -- This annotation ends until the end of the row. mysql> SELECT 1/* This is a comment in the middle of the row */+ 1; mysql> SELECT 1 +/* This is a multi-line comment form */1;
The preceding annotation syntax applies to how the mysqld server analyzes SQL statements. Before being sent to the server, the mysql client program also executes partial statement parsing. (For example, it determines the statement boundary in multiple statement lines through parsing ).
Summary
The above is all about the MySQL statement annotation method in this article. If you are interested, refer to: join for MySQL optimization) examples of optimization techniques used to replace subqueries, MYSQL subqueries, and nested query optimization instances, and slow subqueries using mysql in statements. If you have any shortcomings, leave a message to indicate that, the editor will reply to you and make corrections in a timely manner, hoping to help you.