mysql注释方法一:使用#
mysql>
mysql> SELECT 1+1; # This comment continues to the end of line
+-----+
| 1+1 |
+-----+
| 2 |
+-----+
1 row in set (0.00 sec)
mysql>
mysql注释方法二:使用--
mysql>
mysql> SELECT 1+1; -- This comment continues to the end of line
+-----+
| 1+1 |
+-----+
| 2 |
+-----+
1 row in set (0.00 sec)
mysql注释方法三:使用/* */
mysql>
mysql>
mysql> SELECT 1 /* this is an in-line comment */ + 1;
+---------+
| 1 + 1 |
+---------+
| 2 |
+---------+
1 row in set (0.00 sec)
mysql> SELECT 1+
-> /*
/*> this is a
/*> multiple-line comment
/*> */
-> 1;
+-------+
| 1+
1 |
+-------+
| 2 |
+-------+
1 row in set (0.00 sec)
mysql>
mysql注释方法四:使用/*! */
mysql>
mysql>
mysql> CREATE /*!32302 TEMPORARY */ TABLE t (a INT);
Query OK, 0 rows affected (0.02 sec)
mysql>
mysql> desc t;
+-------+---------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------+------+-----+---------+-------+
| a | int(11) | YES | | NULL | |
+-------+---------+------+-----+---------+-------+
1 row in set (0.00 sec)
mysql>
mysql>
mysql> drop table t;
Query OK, 0 rows affected (0.00 sec)
mysql> 继续阅读与本文标签相同的文章
-
花3000块发明最牛输入法!打字速度冠绝群雄,现在却被遗忘了
2026-05-14栏目: 教程
-
二进制、八进制、十六进制在现实当中有什么意义?
2026-05-14栏目: 教程
-
无需屏幕、裸眼3D,今后广告等可直接成像在空气中
2026-05-14栏目: 教程
-
教你快速从图片中提取数据——科研利器
2026-05-14栏目: 教程
-
梦幻西游:又一服战大佬萌生退意,大量装备均已上架,服战是凄凉
2026-05-14栏目: 教程
