Comment method in mysql workbench: 1. Use "# space comment" and "- space comment" to make single-line comments. The syntax is "# comment content" and "-- comment content"; 2. Use " /*Comment*/" to make multi-line comments, the syntax is "/*comment content*/".
The operating environment of this tutorial: windows10 system, mysql8.0.22 version, Dell G3 computer.
The following introduces several methods of writing comments in MySQL Workbench, so that you can understand the meaning of the code directly by looking at the code later.
1. Single line comment
1.# Space comment
For example:
create database test; # 创建名为test的数据库
2. – Space comment
For example:
create database cda; -- 创建名为test的数据库
2. Multi-line comment
/* Comments*/
For example:
/* 这是 创建数据库 的方式 */
The middle three lines are comments.
Recommended learning: mysql video tutorial
The above is the detailed content of How to comment in mysql workbench. For more information, please follow other related articles on the PHP Chinese website!