SQLCODE function is used within the Exception Handling section of a code. It is used to get the error number. Here, the error number is associated with the most recently raised error exception.
EXCEPTION WHEN OTHERS THEN Raise_application_error (-20001, 'Error detected - '||SQLCODE||' -ERROR- '||SQLERRM); END;
Please follow and like us: