How to Comment Multiple Lines in MySQL
In this tutorial, we are going to see how to comment multiple lines in MySQL. Multi-line comment has the advantage of being able to indicate where the comment begins and ends. It is therefore possible to use it in the middle of an SQL query without any problem.
Example 1: How to Comment Multiple Lines in MySQL
/* This is an example of multi-line comment which select all data in "table1" */ SELECT * FROM table1 WHERE 1 = 1;
[st_adsense]
Example 2: How to Comment Multiple Lines in MySQL
SELECT * /* select all */ FROM table1 /* data in "table1" */ WHERE 1 = /* mid-request example */ 1
Compatibility :
- MySQL
- PostgreSQL
- Oracle
- SQL Server
- SQLite