Questions And Answers

More Tutorials

MYSQL Comment

Adding comments

There are three types of comment:

# This comment continues to the end of line
-- This comment continues to the end of line
/* This is an in-line comment */
This is a
multiple-line comment


SELECT * FROM t1; -- this is comment
 /*id_user int,
 username varchar(30),
 password varchar(30)
 id int

The -- method requires that a space follows the -- before the comment begins, otherwise it will be interpreted as a command and usually cause an error.

#This comment works
/*This comment works.*/
--This comment does not.


In this page (written and validated by ) you learned about MYSQL Comment . What's Next? If you are interested in completing MYSQL tutorial, your next topic will be learning about: MYSQL INSERT.

Incorrect info or code snippet? We take very seriously the accuracy of the information provided on our website. We also make sure to test all snippets and examples provided for each section. If you find any incorrect information, please send us an email about the issue:

Share On:

Mockstacks was launched to help beginners learn programming languages; the site is optimized with no Ads as, Ads might slow down the performance. We also don't track any personal information; we also don't collect any kind of data unless the user provided us a corrected information. Almost all examples have been tested. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. By using, you agree to have read and accepted our terms of use, cookies and privacy policy.