The end of a SQL statement is determined explicitly by a terminating delimiter. For C, this is a semicolon (;).
Host Language |
Terminating Delimiter |
C |
semicolon (;) |
Two types of comments are supported, host language comments and SQL comments:
Host language comments obey the rules determined by the host language.
Host language comments may be positioned anywhere within an SQL statement where a whitespace character can appear. For examples
of host language comments, refer to the host language dependent sections later in this documentation.
Note: Host language comments are not permitted between the following keywords:
EXEC SQL
BEGIN DECLARE SECTION
END DECLARE SECTION
SQL comments are character string preceded by two minus characters (- -).
SQL comments may be positioned anywhere within the SQL statement body where a whitespace character can appear. All characters
following this starting delimiter until the end of the line are interpreted as part of the comment.
If a host languages does not permit nested comments, modify the host language comment delimiters within a statement so the actual SQL statement is commented out; this will prevent nested comments.