close
SQL/PL
Close an open cursor
Syntax
close_stmt:
CLOSE cursor_name
Description
The CLOSE statement is used to close an open cursor.
Example
declare gr_than_avg cursor for select * from acctmgr;
...
open gr_than_avg;
get_next1: loop
fetch gr_than_avg into l_id, l_name, l_date, l_comm;
if not found then
leave get_next1;
end if;
if l_date >= lo_date and l_date <= hi_date then
set comm_sum = comm_sum + l_comm;
set comm_count = comm_count + 1;
end if;
end loop get_next1;
close gr_than_avg;
See Also