Skip Headers
Oracle® Database PL/SQL Language Reference
11g Release 1 (11.1)

B28370-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

Comment

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.

Syntax

comment ::=

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.

text

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.

Caution:

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.

Examples