SQL COMMENTS
SQL COMMENTS is a SQL statement in the SELECT Queries category. SQL commenting styles. Use comments to document complex queries, disable code temporarily, or add metadata. The syntax is -- Single line comment\ /* Multi-line comment */\ # MySQL single line. It returns comment examples. A typical example: -- Single line comment (ANSI standard) SELECT * FROM employees; -- End-of-line comment /* Multi-line comment Can span multiple lines Often used for query documentation */ SELECT name, salary FROM employees /* WHERE department = 'IT' */ -- Temporarily disabled ORDER BY salary DESC; # MySQL-style single line (MySQL, MariaDB only) SELECT * FROM employees; # This is a MySQL comment A close relative is SELECT, which retrieves data from a table. The most fundamental SQL statement. A close relative is SELECT *, which selects all columns from a table. A close relative is SELECT DISTINCT, which returns only distinct (unique) values from the specified columns.