3.7 Plus Notes
MySQL allows annotations to be used in SQL code. This is useful for describing the queries that are stored in the file. You can write comments in two ways. All content, beginning with "#" until the end of the line, is considered a comment. Another is a C-style annotation. That is, all content that ends with "*/" is considered a comment, starting with "/*". C-style annotations can span multiple lines, such as:
Since the MySQL3.23 edition, you Can "hide" mysql-specific keywords in C-style annotations, commenting with "/*!" Rather than start with "/*". MySQL looks inside this particular type of comment and uses these keywords, but the other database servers ignore these keywords as part of the comment. This helps you write code that uses MySQL-specific functionality when MySQL executes, and that code can be used for other database servers without modification. The following two statements are equivalent to a non-MySQL database server, but if it is a MySQL server, an insert delayed action is executed in the second statement:
Since MySQL3.23.3, in addition to the annotation style just described, you can start the annotation with two dashes and a space ("--"), and all content from these dashes to the end of the line is treated as a comment. Some databases start with a double dash as a comment. MySQL also allows this, but need to add a space to avoid confusion. For example, a statement with an expression such as 5--7 may be considered to contain a comment, but it is not possible to write an expression such as 5--7, so this is a useful exploration. However, this is just an exploration, preferably without the annotation of this style.