【MySQL 11】注释

黄舟
Lepaskan: 2017-02-04 13:36:33
asal
1277 orang telah melayarinya

对MySQL代码进行阅读的时候,发现需要添加注释:

mysql注释符有三种:

1、#… 
2、”- - …” 
3、/…/
Salin selepas log masuk

依次测试:

1、#…

mysql> select * from person;    #chazhao
+----+------+------+------+-----------+| id | name | sex  | age  | addr      |
+----+------+------+------+-----------+|  1 | Jone | fema |   27 | xianggang |
|  2 | Lily | fema |   25 | taiwan    |
|  3 | Bobe | male |   25 | ximan     ||  4 | Kity | fama |   20 | beijing   |
+----+------+------+------+-----------+
Salin selepas log masuk

2、”- - …”

mysql> select * from person;    --chazhao
+----+------+------+------+-----------+| id | name | sex  | age  | addr      |
+----+------+------+------+-----------+|  1 | Jone | fema |   27 | xianggang |
|  2 | Lily | fema |   25 | taiwan    |
|  3 | Bobe | male |   25 | ximan     ||  4 | Kity | fama |   20 | beijing   |
+----+------+------+------+-----------+
Salin selepas log masuk

3、/*…*/

mysql> select */*chazhoa*/ from person; --chazhao
+----+------+------+------+-----------+| id | name | sex  | age  | addr      |
+----+------+------+------+-----------+|  1 | Jone | fema |   27 | xianggang |
|  2 | Lily | fema |   25 | taiwan    |
|  3 | Bobe | male |   25 | ximan     ||  4 | Kity | fama |   20 | beijing   |
+----+------+------+------+-----------+
Salin selepas log masuk


以上就是 【MySQL 11】注释的内容,更多相关内容请关注PHP中文网(www.php.cn)!


Label berkaitan:
sumber:php.cn
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Tutorial Popular
Lagi>
Muat turun terkini
Lagi>
kesan web
Kod sumber laman web
Bahan laman web
Templat hujung hadapan