GBase 8a MPP Cluster 支持三种注释风格:
“#”:单行注释;
“--”:单行注释,以“--”开头到该行结束为注释内容。注意“--”(引导号)注释要求第二个引导号后至少跟着一个空格;
“/*注释内容*/”:这种注释支持注释内容为一行或者连续的多行,还支持注释内容在行中间。/**/这个封闭的序列不一定在同一行表示,因此该语法允许多行注释
示例 1:使用“#”注释。
gbase> SELECT 1+1 FROM t;# This comment continues to the END of line
+-----+
| 1+1 |
+-----+
| 2 |
+-----+
1 row in set
示例 2:使用“--”注释。
gbase> SELECT 1+1 FROM t;-- This comment continues to the END of line
文档版本 953(2021-4-7) 南大通用数据技术股份有限公司 621GBase 8a MPP Cluster 产品手册 5 数据库管理指南
+-----+
| 1+1 |
+-----+
| 2 |
+-----+
1 row in set
示例 3:使用“/*单行*/”注释。
gbase> SELECT 1 /* this is an in-line comment */ + 1 FROM t;
+--------+
| 1 + 1 |
+--------+
| 2 |
+--------+
1 row in set
示例 4:使用“/*多行*/”注释。
gbase> SELECT 1+
/*
this is a
multiple-line comment
*/
1 FROM t;
+--------------+
| 1 + 1 |
+--------------+
| 2 |
+--------------+
1 row in set




