Cursor behavior

If a database is not ANSI-compliant, you must use the FOR UPDATE keywords when you declare an update cursor for a SELECT statement. The SELECT statement must also meet the following conditions:
  • It selects from a single table.
  • It does not include any aggregate functions.
  • It does not include the DISTINCT, GROUP BY, INTO TEMP, ORDER BY, UNION, or UNIQUE clauses and keywords.

In ANSI-compliant databases, the FOR UPDATE keywords are implicit when you declare a cursor, and all cursors that meet the restrictions that the preceding list describes are potentially update cursors. You can specify that a cursor is read-only with the FOR READ ONLY keywords on the DECLARE statement.

For more information, see the description of the DECLARE statement in the IBM® Informix® Guide to SQL: Syntax.