SELECT * FROM customers -- This is a comment WHERE city = 'New York'; 复制代码 多行注释:使用斜杠星号(/)开头,星号斜杠(/)结尾来表示注释,中间的内容将被视为注释。例如: /* This is a multi-line comment that spans across multiple lines */ SELECT * FROM customers WHERE city = 'New York...
importjava.util.regex.*;publicclassSQLCommentRemover{publicstaticStringremoveComments(Stringsql){// 正则表达式匹配单行和多行注释StringsingleLineCommentPattern="--.*?(\r?\n|$)";StringmultiLineCommentPattern="/\\*.*?\\*/";// 创建模式对象PatternsingleLinePattern=Pattern.compile(singleLineCommentPatte...
comment ::= single-line-comment | block-comment single-line-comment ::= -- single-line block-comment ::= /* multiple-lines or block [*/] 单行注释由两个短划线指示。单行注释仅扩展到当前行的结尾。 块注释可跨任何数目的行,或者嵌入到单行中。如果没有终止分隔符,则块注释可扩展到输入的结尾。此...
bracketed_comment /* text [ bracketed_comment [...] ] text */ Parameters text:任何文本,包括行尾字符 (EOL) 字符,不包括/*和*/。 示例 SQL >/* This is a comment */>SELECT1;/* This is also a comment */>SELECT/* This is a comment that spans multiple lines */1; >SELECT/* Commen...
For multiple lines of code: If any of the lines were active, all of the lines are now comments. Note that lines that were previously comments now have double comment notation. If all of the lines were comments, all of the lines are now activeRelated...
Gets or sets a boolean indicating if SET clause items should be listed on multiple lines C# 複製 public bool MultilineSetClauseItems { get; set; } Property Value Boolean Applies to 產品版本 Microsoft.SQLServer.DacFx 140.3881.1, 150.18208.0, 160.2004021.0...
A stylistic convention often used for multiple-line comments is to begin the first line with /*, subsequent lines with **, and end with */. There is no maximum length for comments. Nested comments are supported. If the /* character pattern occurs anywhere within an existing comment, it ...
These comment characters can be used on the same line as code to be run, on lines by themselves, or even within executable code. Everything from the open comment pair (/*) to the close comment pair (*/) is considered part of the comment. For a multiple-line comment, the open-comment...
While testing or debugging a program, you might want to disable a line of code. The following example shows how you can "comment-out" the line: -- DELETE FROM employees WHERE comm_pct IS NULL; Multi-line Comments Multi-line comments begin with a slash-asterisk (/*), end with an aster...
(functions and types allowed) COLLATION_CATALOG - COLLATION_NAME - COLLATION_SCHEMA - COLUMN COLUMNS COLUMN_NAME Reserved Non-reserved - COMMAND_FUNCTIO - N COMMAND_FUNCTIO - N_CODE COMMENT Non-reserved COMMENTS Non-reserved COMMIT Non-reserved COMMITTED Non-reserved COMPATIBLE_ILLEGAL Non-reserved ...