Which symbol denotes a single-line comment in SQL-like syntax?

Study for the SQL Basics Test. Improve your knowledge with multiple choice questions and detailed explanations. Prepare effectively to master SQL concepts!

Multiple Choice

Which symbol denotes a single-line comment in SQL-like syntax?

Explanation:
Two hyphens denote a single-line comment in SQL-like syntax. When you put -- at the start of a line, the rest of that line is ignored by the parser, which lets you annotate code without affecting execution. The other symbols serve different purposes: // is used for single-line comments in many languages but not standard SQL; ## isn’t a standard comment marker; and /* */ marks a block comment that can span multiple lines, starting with /* and ending with */.

Two hyphens denote a single-line comment in SQL-like syntax. When you put -- at the start of a line, the rest of that line is ignored by the parser, which lets you annotate code without affecting execution. The other symbols serve different purposes: // is used for single-line comments in many languages but not standard SQL; ## isn’t a standard comment marker; and /* / marks a block comment that can span multiple lines, starting with / and ending with */.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy