Introduction

Comments indicates that what follows should be ignored by the PL/SQL interpreter.

Comments can explain some hidden rules or logic in the code to other developers.

PL/SQL allows two types of comments: single and multi-line.

Single-line comments start with a delimiter --and go to the end of the line:

declare 
 -- here you should declare variables, 
 -- constants, etc. 
      ... 
begin 
 -- here you place your code 
      ... 
end; 

Multi-line comments start with /* and end with */.

These delimiters may span as many lines as needed. An example is shown here:

declare 
/* This code is written by book2s.com
    Dec 20 2018 */ 
      ... 
begin 
      ... 
end; 

Related Topic