MySQL + SQL · Lesson 41
Comments in SQL
Why Comments?
Comments are notes inside SQL that the database ignores. They explain what a query does.
Two Styles
-- This is a single-line comment
SELECT * FROM students; -- also works at line end
/* This is a
multi-line comment */
SELECT name FROM students;
Summary
--starts a single-line comment./* ... */wraps a multi-line comment.