How To Place Comments in PL/SQL

Q

How To Place Comments in PL/SQL? - Oracle DBA FAQ - Understanding PL/SQL Language Basics

✍: FYIcenter.com

A

There are two ways to place comments into PL/SQL codes:

  • SQL Statement Style: Starts you comment any where in the line but prefixed with '--'. The comment ends at the end of the line.
  • C Language Style: Starts you comment any where in the line with '/*' and ends it with '*/' in the same line or some lines below.

Here is some example of PL/SQL comments:

BEGIN
  -- This is a comment
  /* To do:
     Need to write some codes here 
  */
END;

2007-05-01, 5291👍, 0💬