Hệ quản trị CSDL MySQL - Ghi chú

Chú thích trong MySQL 

Trong MySQL, các chú thích cũng có thể được đặt trong các truy vấn SQL. Chú thích có thể là một dòng hoặc nhiều dòng.

Có ba loại chú thích:

1. Sử dụng dấu #

Cú pháp

# comment goes here  

Ví dụ 1:

select *from # JAVATPOINT  
student_1;  

MySQL Comments

2. Sử dụng dấu -- 

Cú pháp

comment goes here  

Ví dụ 2:

 

select *from -- JAVATPOINT  
student_1;  

MySQL Comments

3. Sử dụng " /*  */ "

Cú pháp:

/* comment goes here */  

Ví dụ 3:

select *from student_1 /* JAVATPOINT.com */;  

MySQL Comments