Basic PL/SQL Language Elements

The raw materials for a PL/SQL program are its lexical elements: comments, identifiers, operators, and functions. We'll briefly examine these individual bits and pieces before seeing how they fit together into a functioning program.

Comments

There are two types of comments in PL/SQL: single-line and multiline comments. Single-line comments begin with two dash marks.

-- This is a comment

Multiline comments are identical to Java multiline comments. (They are called multiline comments because they can span multiple lines, but they can also be limited to a single-line.) They begin with a slash-asterisk (/*) and end with an asterisk-slash (*/):

/* This is a multiline
   comment.
 */

Comments can begin anywhere on a line, ...

Get Java™ Oracle® Database Development 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.