The temporary table just exists in current session; DBMaker will automatically drop the temporary table when exiting current session. So if use the temporary table to save the result set in stored procedure, user should not drop the temporary table directly after getting result.
If execute the stored procedure more than one time in current session, then the second time it will show error: the table has existed. So it needs to add “drop table table_name” statement at the beginning of the sp to avoid the case.
And After “$ begin code section;” statement, please add the following two statements
$ WHENEVER SQLERROR CONTINUE;
$ drop table temporanea;