Rumah >pangkalan data >tutorial mysql >Apakah cara untuk menambah komen dalam pertanyaan MySQL?
Kami boleh menambah komen dalam beberapa cara yang disokong oleh pelayan MySQL -
mysql> Select NOW() #Single line comment continues to the end of line -> ; +---------------------+ | NOW() | +---------------------+ | 2017-11-07 15:04:03 | +---------------------+ 1 row in set (0.00 sec) mysql> Select NOW() -- Single line comment continues to the end of line -> ; +---------------------+ | NOW() | +---------------------+ | 2017-11-07 15:04:17 | +---------------------+ 1 row in set (0.00 sec) mysql> Select 1 /* in-line comment */ +1; +-------+ | 1 +1 | +-------+ | 2 | +-------+ 1 row in set (0.10 sec) mysql> Select 1 /* 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)p>
Atas ialah kandungan terperinci Apakah cara untuk menambah komen dalam pertanyaan MySQL?. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!