SQL*PLUS - REM[ark] Statement

Add comments to an sql script.

Syntax:

   REMARK Single line comment 

   -- Single line comment

   /* Single line comment */

   /* 
     Multi Line
     comment
   */

A common mistake is to use /* but not followed by a space (or newline) this will be interpreted as "/" and will execute the previous SQL command.
Although the actual comment will be ignored this behaviour can have significant unexpected results:
even if there's no previous command to execute then Oracle will error with "Nothing in SQL buffer to run".

UNIX style comments ( # at the beginning of a line) don’t work - Oracle will interpret and execute the whole line. They do however work for import and export parameter files.

“It is a profitable thing, if one is wise, to seem foolish” ~ Aeschylus

Related Oracle Commands:

SQL Plus commands


 
Copyright © 1999-2024 SS64.com
Some rights reserved