|
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 or a trigger, since cursors and variables are only allowed inside of stored procedures and triggers.
The following example closes the cursor BTUCursor.
CREATE PROCEDURE MyProc(IN :CourseName CHAR(7)) AS BEGINENDDECLARE cursor1 CURSOR FOR SELECT Degree, Residency, Cost_Per_Credit FROM Tuition ORDER BY ID; ......... .........FETCH cursor1 INTO :CourseName;......... CLOSE cursor1; .........
|
Chapter contents
Prev topic: CASE (string)
|