SQL Syntax Reference : CLOSE
 
CLOSE
Syntax
CLOSE cursor-name
 
cursor-name ::= user-defined-name
Remarks
The CLOSE statement closes an open SQL cursor.
The cursor that the cursor name specifies must be open.
This statement is allowed only inside of a stored procedure, user-defined functions, or a trigger. Cursors and variables are only allowed inside of stored procedures, user-defined functions, and triggers.
Examples
The following example closes the cursor BTUCursor.
CLOSE BTUCursor;
============ 
CREATE PROCEDURE MyProc(OUT :CourseName CHAR(7)) AS
BEGIN
DECLARE cursor1 CURSOR
FOR SELECT Degree, Residency, Cost_Per_Credit
FROM Tuition ORDER BY ID;
OPEN cursor1;
FETCH NEXT FROM cursor1 INTO :CourseName;
CLOSE cursor1;
END
See Also
OPEN
CREATE PROCEDURE
CREATE TRIGGER