4.1.5. Comments

4.1.5. Comments

4.1.5. 注释

A comment is a sequence of characters beginning with double dashes and extending to the end of the line, e.g.:

以两个-开头的整行,都是注释,例如:

-- This is a standard SQL comment

Alternatively, C-style block comments can be used:

当然,C类型的块注释也可以使用:

/* multiline comment

* with nesting: /* nested block comment */

扫描二维码关注公众号,回复: 9213808 查看本文章

*/

where the comment begins with /* and extends to the matching occurrence of */. These block comments nest, as specified in the SQL standard but unlike C, so that one can comment out larger blocks of code that might contain existing block comments.

/*与*/之间的均为注释。 按照SQL标准的规定,这些块注释嵌套,但与C不同,因此可以注释掉可能包含现有块注释的较大代码块。

A comment is removed from the input stream before further syntax analysis and is effectively replaced by whitespace.

在进行进一步的语法分析之前,将从输入流中删除注释,并有效地将其替换为空格。

发布了341 篇原创文章 · 获赞 53 · 访问量 88万+

猜你喜欢

转载自blog.csdn.net/ghostliming/article/details/104233100