Error handling in 5.0 stored routines (sqlstate & signal)
Hi,
In the SQL:2003 stored procedure spec, there is support for the SIGNAL command that allows you to raise a condition programatically.
So in SQL:2003 I could do something like:
DECLARE c_too_many_rows CONDITION FOR SQLSTATE '99001';
/* SOmething happens that returns too many rows*/
SIGNAL c_too_many_rows set message_text='Too many rows';
SIGNAL isn't mentioned in the 5.0.3 manual, and the above text generates an error. Interestingly, MySQL doesn't complain about the SIGNAL clause, just doesn't like whatever follows. Is SIGNAL implemented in an undocumented form? or is it just a reserved word at this point?
Also, is there any way to access the contents of SQLCODE and/or SQLSTATE inside a stored procedure?
Thanks,
Guy
Subject
Written By
Posted
Error handling in 5.0 stored routines (sqlstate & signal)
February 17, 2005 11:23PM
February 18, 2005 08:08AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.