When any chance exists that a query could return more than one row, the program must execute the query differently. Multirow queries are handled in two stages. First, the program starts the query. (No data is returned immediately.) Then the program requests the rows of data one at a time.
These operations are performed using a special data object called a cursor. A cursor is a data structure that represents the current state of a query. The following list shows the general sequence of program operations:
These operations are performed with SQL statements named DECLARE, OPEN, FETCH, CLOSE, and FREE.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]