SQL Statements in C
The SQL Terminating Delimiter
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 (;) |
Comments within an SQL Statement
Host language comments obey the rules determined by the host language and can 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 EXEC SQL, BEGIN DECLARE SECTION, and END DECLARE SECTION keywords.
SQL comments are character string preceded by two minus characters (- -) and can 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.