Common Exception Handling for Oracle

Source: Internet
Author: User

Summarizes the Oracle exceptions and handling methods that are often encountered when working with databases.

Code

Tips

Note

General processing methods

ORA-01861

The text does not match the format string-

ORA-00904

Invalid column name

Invalid column name

Check that the column names are case-sensitive or wrong-written

The lookup table and the lookup column do not match

ORA-00942

Table or view does not exist

Table or view does not exist

Check that the table names in SQL are correct

ORA-01400

Cannot insert NULL into ()

Checks if the table has a NOT NULL constraint while performing an insert operation without giving the data

Check whether non-null is required in the column

ORA-00936

Missing an expression

Check the syntax of the SQL statement

ORA-00933

SQL command does not end correctly

Check the syntax of the SQL statement

ORA-01722

Invalid number

It is generally possible to attempt to populate a numeric type with a value of the string type, resulting in

ORA-06530

Access_into_null

An attempt to write a value to a property of an object that is not initialized

ORA-06592

Case_not_found

Case statement is malformed, no branch statement

ORA-00001

Dup_val_on_index

Database field store duplicates, primary key unique values conflict

ORA-01001

Invalid_cursor

Invalid pointer

ORA-01722

Invalid_number

Invalid number

An attempt was made to populate a numeric type with a value of type string, and to examine the SQL statement

ORA-01017

Login_denied

Access Denied

Deny Login

The case and the property file do not match when the key value is in the program.

cannot be converted to an internal representation

Note The data type when the result set takes data.

The file could not be found

Possible cause: Db.properties file path is incorrect

Note: Be sure to commit when new data is added, otherwise the Java program cannot find the data after running the query.

The general SqlException is due to an error in manipulating the database, such as a SQL statement being written incorrectly, or an error in the table or data in the database.

Common Exception Handling for Oracle

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.