MySQL Tutorial
In MySQL, comments are used to add notes or explanations within your SQL code. Comments are ignored by the database engine and are solely for developers to make the code easier to read and understand.
MySQL supports three types of comments:
--
#
/* ... */
--
(two hyphens) followed by a space for a single-line comment.Try it yourself
#
#
is another way to add single-line comments in MySQL.Try it yourself
Note
# comments are not part of the SQL standard, but they work in MySQL.
/*
to start the comment and */
to end it.Try it yourself
Try it yourself