-
Notifications
You must be signed in to change notification settings - Fork 407
Comments
Daniël van Eeden edited this page Mar 13, 2024
·
7 revisions
Standard SQL supports two types of comments:
-- single line comment
/* multi line
block comment */
These are supported by all dialects.
According to standard, block comments can also be nested, like:
/* main comment
/* sub-comment */
*/
This is however only supported by some dialects:
- DB2i
- PostgreSQL
- Transact-SQL
- MariaDB and MySQL docs mention that nested comments might be supported in some places, but their support is deprecated and one is advised not to use them.
Some dialects additionally support shell-style hash-comments:
# a comment
Some dialects additionally support c-style slash-comments:
// a comment
- Snowflake