Which of the following is used for single-line comment in SQL?

2018

Which of the following is used for single-line comment in SQL?

  1. A.

    &&

  2. B.

    /* ...*/

  3. C.

    --

  4. D.

    ##

Attempted by 491 students.

Show answer & explanation

Correct answer: C

In SQL, the double dash '--' is used to create single-line comments within a query. Text following these symbols on the same line is ignored by the database engine.

Explore the full course: Up Lt Grade Assistant Teacher 2025