From 61d8d3d8d0bb7e109d85b8ebe7894b65bfd3b23a Mon Sep 17 00:00:00 2001 From: prinz <281208364@qq.com> Date: Wed, 25 Oct 2023 15:34:56 +0800 Subject: [PATCH] modify the doc of comment --- .../Reference/Language-Structure/comment.md | 34 ++++++------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/docs/MatrixOne/Reference/Language-Structure/comment.md b/docs/MatrixOne/Reference/Language-Structure/comment.md index 15f892c0e..18ef6a0c0 100644 --- a/docs/MatrixOne/Reference/Language-Structure/comment.md +++ b/docs/MatrixOne/Reference/Language-Structure/comment.md @@ -56,56 +56,44 @@ MatrixOne supports three comment styles: 1 row in set (0.01 sec) ``` -## MySQL-compatible comment syntax +## MatrixOne specific comment syntax -The same as MySQL, MatrixOne supports a variant of C comment style: +- MatrixOne supports C comment style as below: ```sql -mysql> select 100 /*! Specific code */ -99; +mysql> select 100-99; // This comment continues to the end of line +----------+ | 100 - 99 | +----------+ | 1 | +----------+ -1 row in set (0.02 sec) +1 row in set (0.03 sec) ``` Or: ```sql -mysql> select 100 /*!50110 Specific code */ -99; +mysql> // This comment continues to the line + -> select 100-99; +----------+ | 100 - 99 | +----------+ | 1 | +----------+ -1 row in set (0.02 sec) ``` -## MatrixOne specific comment syntax - -MatrixOne supports a variant of C comment style: +- MatrixOne dose not support C comment style as below: ```sql -mysql> select 100-99; // This comment continues to the end of line -+----------+ -| 100 - 99 | -+----------+ -| 1 | -+----------+ -1 row in set (0.03 sec) +mysql> select 100 /*! Specific code */ -99; +ERROR 1064 (HY000): SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 28 near " code */ -99"; ``` Or: ```sql -mysql> // This comment continues to the line - -> select 100-99; -+----------+ -| 100 - 99 | -+----------+ -| 1 | -+----------+ +mysql> select 100 /*!50110 Specific code */ -99; +ERROR 1064 (HY000): SQL parser error: You have an error in your SQL syntax; check the manual that corresponds to your MatrixOne server version for the right syntax to use. syntax error at line 1 column 33 near " code */ -99"; ``` ## Constraints