Lors de la lecture du code MySQL, j'ai constaté que je devais ajouter des commentaires :
Il existe trois types de caractères de commentaire MySQL :
1、#… 2、”- - …” 3、/…/
Test dans l'ordre :
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. « - - … »
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 | +----+------+------+------+-----------+
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 | +----+------+------+------+-----------+