首頁  >  文章  >  資料庫  >  【MySQL 11】註釋

【MySQL 11】註釋

黄舟
黄舟原創
2017-02-04 13:36:331289瀏覽

對MySQL程式碼進行閱讀的時候,發現需要加入註解:

mysql註解有三種:

1、#… 
2、”- - …” 
3、/…/

依序測驗:

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   |
+----+------+------+------+-----------+

2、」- - …”

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   |
+----+------+------+------+-----------+
*…*/

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   |
+----+------+------+------+-----------+


以上就是 【MySQL 11】註解的內容,更多相關內容請關注PHP中文網(www.php.cn)!


陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn