Double Hyphen (- -)

The double hyphen may be used to place a single-line comment in a SQL*Plus script, and is described in Chapter 4. The double hyphen works the same way as REMARK, except that it may also be used in SQL statements and PL/SQL blocks. When used in a SQL statement or PL/SQL block, the double-hyphen may also be used to add trailing comments to a line. The syntax looks like this:

--comment_text

where:

- -

Is a double hyphen, and tells SQL*Plus that the line in question is a comment line.

comment_text

Is your comment.

Get Oracle SQL*Plus: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.