Comment Syntax
Complete SQL comment syntax: single-line # and -- (space required), multi-line /* */ blocks, MySQL /*!##### */ and MariaDB /*M!##### */ executable comments.
Last updated
Was this helpful?
Was this helpful?
/*! MySQL or MariaDB-specific code *//*!##### MySQL or MariaDB-specific code *//*!50100 MySQL and MariaDB 5.1.0 (and above) code goes here. *//*M! MariaDB-specific code */
/*M!###### MariaDB-specific code *//*!50701 MariaDB-10.x ignores MySQL-5.7 specific code *//*M!50701 MariaDB-10.x does not ignore this */SELECT 2 /* +1 */;
SELECT 1 /*! +1 */;
SELECT 1 /*!50101 +1 */;
SELECT 2 /*M! +1 */;
SELECT 2 /*M!50301 +1 */;/*M!100100 select 1 ; */
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1/*M!100100 select 1 */;
+---+
| 1 |
+---+
| 1 |
+---+