Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateMiscellaneous language elements → -- (single-line comment)
Firebird Home Firebird Home Prev: Miscellaneous language elementsFirebird Documentation IndexUp: Miscellaneous language elementsNext: || (string concatenator)

-- (single-line comment)

Tip

Find a more recent version at Firebird 5.0 Language Reference: Comments

Available in: DSQL, PSQL

Added in: 1.0

Changed in: 1.5

Description: A line starting with -- (two dashes) is a comment and will be ignored. This also makes it easy to quickly comment out a line of SQL.

In Firebird 1.5 and up, the -- can be placed anywhere on the line, e.g. after an SQL statement. Everything from the double dash to the end of the line will be ignored.

Example: 

-- a table to store our valued customers in:
create table Customers (
  name varchar(32),
  added_by varchar(24),
  custno varchar(8),
  purchases integer      -- number of purchases
)

Notice that the second comment is only allowed in Firebird 1.5 and up.

Prev: Miscellaneous language elementsFirebird Documentation IndexUp: Miscellaneous language elementsNext: || (string concatenator)
Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateMiscellaneous language elements → -- (single-line comment)