Oracle built-in functions sqlcode and sqlerrm

Source: Internet
Author: User
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 ".

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.