Comments Within SQL Statements
A comment can appear between keywords, parameters, or punctuation marks in a statement. You can include a comment in a statement in two ways:
-
Begin the comment with a slash and an asterisk (
/*
). Proceed with the text of the comment. The text can span multiple lines. End the comment with an asterisk and a slash. (*/
). You do not need to separate the opening and terminating characters from the text by a space or line break. -
Begin the comment with two hyphens (
--
). Proceed with the text of the comment. The text cannot extend to a new line. End the comment with a line break.