MySQL Tutorial
Comments are a piece of code which is ignored in execution
Comments allows developers to leave notes about their code
It is a good practice to add comments into your MySQL code, especially in complex documents
Single line comments start with --.
Any text between -- and the end of the line will be ignored (will not be executed).
--Select all:
SELECT * FROM Students;
SELECT * FROM Students -- WHERE ROLL_NO='Berlin';
--SELECT * FROM Students;
SELECT * FROM Students;
Multi-line comments start with /* and end with */.
Any text between /* and */ will be ignored.
/*Select all the columns
of all the records
in the Students table:*/
SELECT * FROM Students;
/*SELECT * FROM Students;
SELECT * FROM Students;
SELECT * FROM Students;*/
SELECT * FROM Students;
SELECT ROLL_NO, /*SUBJECT,*/ NAME FROM Students;