MySQL supports three types of comments: 1. From the '#' character from the end of the line. 2. From the '--' sequence to the end of the line. Please note that the '-- ' (double dash) comment style requires that the second dash be followed by at least one whitespace character (eg space, tab, newline, etc.). 3. From the /* sequence to the following */ sequence. The closing sequence does not have to be on the same line, so this syntax allows comments to span multiple lines. The following example shows 3 styles of comments: //How to write comment statements in mysqlmysql> SELECT 1+1; # This comment continues until the end of the linemysql> SELECT 1+1; -- This comment continues until the end of the linemysql> SELECT 1 /* This is a comment in the middle of a line*/ + 1; mysql> SELECT 1+ /* This is a multi-line comment form */ 1; The above comment syntax applies to how the mysqld server parses SQL statements. The MySQL client also performs some statement parsing before sending it to the server. (For example, it parses to determine statement boundaries in multi-statement lines). Summarize The above is all about the introduction of MySQL statement comment method in this article. Interested friends can refer to: MySQL optimization using connection (join) instead of subquery, MYSQL subquery and nested query optimization example analysis, MySQL in statement subquery efficiency optimization skills example, etc. If there are any deficiencies, please leave a message to point them out. The editor will reply to you in time and make corrections. I hope it will be helpful to you. You may also be interested in:
|
<<: React Diff Principle In-depth Analysis
>>: Explanation of Dockerfile instructions and basic structure
Effect: Ideas: Use the input type attribute to di...
To learn content-type, you must first know what i...
First execute the command: [root@mini61 setuptool...
This article shares the specific code for JavaScr...
Table of contents JavaScript private class fields...
Recently, I have been working on a project and ne...
Achieve resultsImplementation Code html <input...
Table of contents 1. Default values for functio...
1. Link's to attribute (1) Place the routing ...
Preface MySQL 8.0.13 began to support index skip ...
Table of contents Function Introduction Rendering...
Preface I encountered a situation at work: In the...
There are two main reasons why it is difficult to...
Table of contents 1. Routing animation 2. Group Q...
Table of contents 1. What is Javascript? 2. What ...