IBM Books

SQL Reference


SQL Comments

Static SQL statements can include host language or SQL comments. SQL comments are introduced by two hyphens.

These rules apply to the use of SQL comments:

Example:  This example shows how to include comments in an SQL statement within a C program:

  EXEC SQL
    CREATE VIEW PRJ_MAXPER         -- projects with most support personnel
      AS SELECT PROJNO, PROJNAME   -- number and name of project
           FROM PROJECT
           WHEREDEPTNO = 'E21'    -- systems support dept code
           AND PRSTAFF > 1;


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]