Comments

Impala supports the familiar styles of SQL comments:

  • All text from a -- sequence to the end of the line is considered a comment and ignored. This type of comment can occur on a single line by itself, or after all or part of a statement.
  • All text from a /* sequence to the next */ sequence is considered a comment and ignored. This type of comment can stretch over multiple lines. This type of comment can occur on one or more lines by itself, in the middle of a statement, or before or after a statement.

For example:

  1. -- This line is a comment about a table.
  2. create table ...;
  3. /*
  4. This is a multi-line comment about a query.
  5. */
  6. select ...;
  7. select * from t /* This is an embedded comment about a query. */ where ...;
  8. select * from t -- This is a trailing comment within a multi-line command.
  9. where ...;

Parent topic: Impala SQL Language Reference