PostgreSQL/Postgre SQL/Comments

Материал из SQL эксперт
Перейти к: навигация, поиск

Multiline comments

postgres=# -- Multiline comments
postgres=#
postgres=# SELECT "Multi" /* This comment extends across
postgres*#                 * numerous lines, and can be
postgres*#                 * /* nested safely */ */
postgres-#        || "-test" AS example;
  example
------------
 Multi-test
(1 row)
postgres=#



Single-line comments

postgres=# -- Single-line comments
postgres=#
postgres=# SELECT "Test" -- This can follow valid SQL tokens,
postgres-#              -- or be on a line of it own.
postgres-# AS example;
 example
---------
 Test
(1 row)
postgres=#