MySQL Comments

In MySQL, comments can also be placed in the SQL queries. Comments can be of single line or multiple lines.

There are three types in which comments can be written:-

1. Using # symbol

Syntax

snippet
# comment goes here

Example 1

snippet
select *from # JAVATPOINT
student_1;
MySQL Comments

2. Using -- symbol

Syntax

snippet
comment goes here

Example 2

snippet
select *from -- JAVATPOINT
student_1;
MySQL Comments

3. Using /* and */ symbol

Syntax

snippet
/* comment goes here */

Example 3

snippet
select *from student_1 /* JAVATPOINT.com */;
MySQL Comments
Related Tutorial
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 https://twitter.com/RookieNerdTutor https://plus.google.com/b/117136517396468545840 #
Contents