SQL Comments
- Last Updated: October 3, 2020
- 1 minute read
- DataDirect Connectors
- ODBC
- Cloudera Impala 7.1
- dBase 7.1
- Flat files/Text 7.1
- MySQL 7.1
- Pervasive (Btrieve) 7.1
- XML 7.1
- Documentation
ANSI SQL-92 standard comments (--) and C++ standard comments (/*...*/, //) are supported. Comments can be nested.
For example, in the following query columns col2, col3, and col4 are ignored:
SELECT col1 /* col1 comment */
/*
col2,-- col2 comment
col3,// col3 comment
col4,/* col4 comment */
*/
FROM t1