The SIGNAL statement allows you to signal an exception condition or a completion condition other than successful completion.
Signalling an SQLSTATE value causes
SQLSTATE to be set to a specific value. This value is then returned to the user, or made available to the calling procedure (through the
SQLSTATE value). This value is available to the application calling the procedure.