Enterprise Edition Home | Express Edition Home | Previous Page | Next Page   SQL Statements > WHENEVER >

NOT FOUND Keywords

If you use the NOT FOUND keywords, exception handling for SELECT and FETCH statements (including implicit SELECT and FETCH statements in FOREACH and UNLOAD statements) is treated differently from other SQL statements. The NOT FOUND keyword checks for the following cases:

In each case, the sqlcode variable is set to 100, and the SQLSTATE variable has a class code of 02. For the name of the sqlcode variable in each IBM Informix product, see the table in SQLERROR Keyword.

The following statement calls the no_rows( ) function each time the NOT FOUND condition exists:

WHENEVER NOT FOUND CALL no_rows

If you do not use any WHENEVER NOT FOUND statements in a program, the default action for WHENEVER NOT FOUND is CONTINUE.

Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]