What are the types of SQL comments?

A

Abhijeet Mishra

Comments Type in SQL

In SQL, There are two types of SQL Comments used, the first one single-line and the second one multi-line comment. Even, one comment type is also used which is called SQL Comment Indicator.

  1. Single Line Comments
  2. Multi-Line Comments
  3. SQL Comment Indicator

Single Line Comment

Two dashed used at the start of the line, means for single line comment; an example is mentioned below for more understanding.

Single Line Comment Example

--Single-Line Comments

Multi_line Comment

In multi-line comments, Write comments between start /* and end */; an example is mentioned below for more understanding.

Multi-line Comment Example

/* write first line code here

second line comment here */

1 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)