SQL support / Result set processing |
Closes a database cursor and frees resources allocated on the database server for the result set.
CLOSE cid
The CLOSE instruction releases the resources allocated for the result set on the database server.
After using the CLOSE instruction, you must reopen the cursor with OPEN before retrieving values with FETCH.
You should close the cursor when the result set is no longer used, this saves resources on the database client and database server side.
MAIN DATABASE stores DECLARE c1 CURSOR FOR SELECT * FROM customer OPEN c1 CLOSE c1 OPEN c1 CLOSE c1 END MAIN