SQL COMMENTS

Comments are hints that a programmer add to explain the statements and make it more understandable.

It is also used to restrict the execution of some statements.

There are two types of comments:

1. Single Line Comments, &

2. Multi Line Comments.

Single line Comments : Single-line comments Start and ends with(- -).Any text are write between (- -) then, it is ignored (will not be executed).

Example:

-- This will select all students from the table students --
SELECT * FROM students;

Multi-line comments:

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

Any text are write between /* and */ will be ignored  .

Example:

/*Select all the columns 
of the students table:*/
SELECT * FROM students;