/* ... */ là cú pháp comment khối (multi-line comment) trong MySQL. Nội dung giữa cặp dấu này bị bỏ qua khi thực thi.
Ví dụ
mysql> /* This is the first MySQL Program */
MySQL bỏ qua comment này.
Comment trước câu lệnh CREATE TABLE
mysql> /*This table has information about person */
mysql> create table DemoTable (
PersonId int NOT NULL AUTO_INCREMENT PRIMARY KEY,
PersonName varchar(20),
PersonAge int
);
Query OK, 0 rows affected (0.58 sec)Các loại comment trong MySQL:
/* ... */- comment khối (nhiều dòng)--(hai gạch ngang + space) - comment đến cuối dòng#- comment đến cuối dòng (chỉ MySQL)
Ứng dụng: Viết chú thích tài liệu, tạm vô hiệu hóa đoạn code khi debug.