Oracle: Single and Multi Line Comments

Comments in Oracle are something written in a simply readable language and are excluded as a part of code.
Comments are basically written for once understanding. It can be considered the same as when we read something and we add some notes to understand the concepts. Comments can be added in Oracle in 2 different ways:

1. Single line comment

  • This type of comment is basically applicable for a single line.
  • Note that as the cursor of the code is moved to the next line, The functioning of the single-line comment is terminated.  
  • We use a double hyphen symbol '--' to start and end a single line comment.

Syntax

--This is a single link comment--

Output
single line comment

2. Multi-Line comment

  • This fulfills the task that single-line comment was unable to. i.e Multiline comment is used to write comments in multiple lines.
  • The multiline comment is never terminated before we use the '*/' symbol.
  • This comment starts with the '/*' symbol.

Syntax

/* this is a 
multiline comment*/

Output
multiline comment