Can I add comments to the Queries?
updated at
Apply OS: Windows, macOS, Linux
Apply Navicat Product: All
Apply Navicat Version No.: All
MySQL & MariaDB
You can use # or /*...*/ to add comments to the queries.
Note that starting from MySQL Server 3.23.3, it supports a variant of the ‘--’ comment style. That is, the ‘--’ start-comment sequence must be followed by a space (or by a control character such as a newline).
For example:
mysql> SELECT 1+1; # This comment continues to the end of line
mysql> SELECT 1+1; -- This comment continues to the end of line
mysql> SELECT 1 /* this is an in-line comment */ + 1;
mysql> SELECT 1+
/*
this is a
multiple-line comment
*/
1;
For more information, please refer to:
https://dev.mysql.com/doc/refman/8.0/en/ansi-diff-comments.html
https://dev.mysql.com/doc/refman/8.0/en/comments.html
PostgreSQL, Oracle, SQLite & SQL Server
To add comments to the queries, please use -- or /*...*/ .
MongoDB
To add comments to the queries, please use // or /*...*/ .
Redis
To add comments to the queries, please use //.
-
Support
-
About Us