Comments in MySQL or MariaDB - MySQL Developer Tutorial

Comments in MySQL or MariaDB


If you need to comment out only single line, then you can use -- or #. If you are using -- then after -- use the space.

Example:



-- This is comment
Select * from customer
# Select * from employee


If you need to comment out multiple lines then you can use /* multiple line comments */.


/* Use customer table 
to get information related to 
customers

*/



Executable Comments : 

MySQL provides executable comments , so the code will run on MySQL database but not on other databases systems.


/*! Your Code here */


This will run on MySQL database but not on other database systems.


How to use Comments in MySQL  or Comments in MairaDB - MySQL Developer Tutorial

11 comments:

  1. This comment has been removed by the author.

    ReplyDelete