In MySQL
, the DEALLOCATE
is used to drop a prepared statement
but not cursor
.
{DEALLOCATE | DROP} PREPARE stmt_name
And on cursor, you might be trying to close it.
CLOSE cursor_name
This statement closes a previously opened named cursor. Unless closed explicitly, it will be closed at the END
of the routine.