How To Comment In SQL?

Use `–` for a single-line comment

Use `/* comment */` for a multi-line comment

Place `–` before the text to comment out the rest of a line

Place `/*` before and `*/` after the text to comment out a block

Use `#` for single-line comments in MySQL

Use `REM` for comments in some SQL tools and dialects

Use comments to temporarily disable SQL code

Use comments to add notes inside SQL queries

Suggested for You

Trending Today