Comments

Comments are arbitrary sequences of characters beginning with two consecutive hyphen characters and extending to the end of the line.

Comments are arbitrary sequences of characters beginning with two consecutive hyphen characters and extending to the end of the line. For example:

   -- This is a standard SQL comment

A comment is removed from the input stream before further syntax analysis and is effectively replaced by white space. You can use comments to document, explain, or prevent execution of SQL statements. In addition to single-line hyphen comments, SQL supports C-style multi-line block comments. Multi-line comments begin with /* and extend to the corresponding occurrence of */, as shown by the following example:

   /* multi-line comment
    * with nesting: /* nested block comment */
    */

These block comments nest, as specified in the SQL standard. Unlike in C, SQL allows you to comment out larger blocks of code that contain existing block comments.