SQL TutorialLesson 44Free preview
SQL Comments
This lesson is part of SQL · All levels
Summary
Comment or comment is used to write notes in a query that is not executed by a database. There are two main styles, namely two strips for one-line commentary and asterisk-slash for multi-line commentary. Comments help teams understand the query's intent and facilitate the debugging process.
Key points
- One line commentary with a mark -- at the beginning of the commentary.
- Multi-line commentary using the block.
- Comments do not affect the results of the query execution.
- It's useful to temporarily disable some queries without deleting them.
- Writing comments on complicated queries is a good documentation practice.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.