Executing SQL statements

To run the SQL you have entered in the statement entry area, press Enter.

If the SQL statement returns a result table, FM/Db2 displays it in an edit or browse panel, depending on the setting of the Use edit (instead of browse) to display results option.

If you have entered more than one SQL statement, the statements are run in sequence, interrupted by the display of any result tables. Execution continues until:
  • An error occurs,
  • The CANCEL command is entered on a result table display, or
  • All the statements have been run

You can use the Enter, Execute and Explain SQL Statements panel to specify one or more of the following SQL SELECT statements (without using prototyping) and then run them in sequence:


ALTER                  COMMENT ON            COMMIT
CREATE                 DELETE                DROP
EXPLAIN                GRANT                 INSERT
LABEL ON               LOCK TABLE            RENAME
REVOKE                 ROLLBACK              SELECT
SET CURRENT DEGREE     SET CURRENT SQLID     UPDATE

Related tasks

Related references