A comment is text that the PL/SQL compiler ignores. Its primary purpose is to document code, but you can also disable obsolete or unfinished pieces of code by turning them into comments. PL/SQL has both single-line and multiline comments.


comment ::=

Description of the illustration comment.gif

Keyword and Parameter Descriptions


Turns the rest of the line into a single-line comment. Any text that wraps to the next line is not part of the comment.


Begins a comment, which can span multiple lines.


Ends a comment.


Any text.

Usage Notes

A single-line comment can appear within a statement, at the end of a line. A single-line comment can appear inside a multiline comment.


Do not put a single-line comment in a PL/SQL block that will be processed dynamically by an Oracle Precompiler program. The Oracle Precompiler program ignores end-of-line characters, which means that a single-line comment will end at the end of the block.

A multiline comment can appear anywhere except within another multiline comment.