Handling SQL Exceptions using SQLCODE rather than SQLSTATE

General
Enthusiast

Handling SQL Exceptions using SQLCODE rather than SQLSTATE

Hi

   We know, SQL exceptions can be handled using CONTINUE handlers based on the SQLSTATE. But can we handle the exceptions based on SQLCODE(errorCodes). I see SQLSTATE is common for a lot of error codes. But I want to create a procedure where the procedure should stop only when it  encounter particular error codes. Please provide your thoughts on this. Thanks.