Firebird 2.5 Language ReferenceFirebird 2.5 Language ReferenceSQL Language Structure → Comments
Firebird Firebird Prev: Operators and Special CharactersFirebird 2.5 Language ReferenceUp: SQL Language StructureNext: Data Types and Subtypes

Comments

Comments may be present in SQL scripts, SQL statements and PSQL modules. A comment can be any text specified by the code writer, usually used to document how particular parts of the code work. The parser ignores the text of comments.

Firebird supports two types of comments: block and in-line.

Syntax: 

  <comment> ::= <block comment> | <single-line comment>

  <block comment> ::=
  /* <ASCII char>[<ASCII char> …] */

  <single-line comment> ::=
    -- <ASCII char>[<ASCII char> …]<end line>
      

Block comments start with the /* character pair and end with the */ character pair. Text in block comments may be of any length and can occupy multiple lines.

In-line comments start with a pair of hyphen characters, -- and continue up to the end of the current line.

Example: 

  CREATE PROCEDURE P(APARAM INT)
  RETURNS (B INT)
  AS
  BEGIN
    /* This text will be ignored during the execution of the statement 
       since it is a comment
    */
    B = A + 1; -- In-line comment
    SUSPEND;
  END
      
Prev: Operators and Special CharactersFirebird 2.5 Language ReferenceUp: SQL Language StructureNext: Data Types and Subtypes
Firebird 2.5 Language ReferenceFirebird 2.5 Language ReferenceSQL Language Structure → Comments