Oracle Built-in functions Sqlcode And Sqlerrm Is particularly used Others Processor Are used to return Oracle Of ErrorCodeAnd error messages.
OthersThe processor should be the final exception processor in the exception processing block because it is used to capture allOracleException, soInProgramThe outermost layerOthersThe processor ensures that all errors are detected.
In an internal exception, Sqlcode Return Oracle Wrong serial number, and Sqlerrm The error message is returned. The error code is displayed first. Sqlcode Returns a negative number, unless Oracle The error is" ORA-01403 : No data found : ORA-01403 : No data found), when Oracle The error is" ORA-01403 : No data found ", The corresponding Sqlcode Is + 100 . For user-defined exceptions, Sqlcode The returned result is + 1 , And Sqlerrm The returned result is User-Defined
Exception .
One Oracle Error messages can only contain 512 Byte error code. If no exception is triggered Sqlcode Return 0 , Sqlerrm Return" ORA-0000 : Normal, successful
Completion ".