Some of the most common errors in JDBC access to Oracle databases

Source: Internet
Author: User
Some of the most common errors in JDBC access to Oracle databases. The example in the sample code and/or comment column shows the type of SQL statement that caused the error or additional comments about the specific error that is displayed on the row in the table.

Table 1

Error Mark Oracle Error SQLState Sample code and/or comments

Based on statement: SELECT ename SQL related error from EMP variant

"Uniqueness Constraint" 1 2300 For example, primary key violation

"Resource busy and specify nowait to get Resources"

54 61000 Only appears when NOWAIT is specified

"Invalid SQL statement"

900 42000

Ename from EMP

"Invalid table name"

903 42000

SELECT ename from

"Invalid identifier"

904 42000

SELECT EMPname from emp

"Invalid character"

911 42000

SELECT ename from EMP;

"Missing Columns"

917 42000

Omitting commas when you need commas to separate columns in an INSERT statement can be a reason.

"The FROM keyword was not found at the desired location"

923 42000

SELECT ename EMP

"Missing expression"

936 42000

SELECT from EMP

"Table or view does not exist"

942 42000

SELECT ename from Empp

"Cannot insert null value"

1400 23000 An attempt was made to insert a null value into a column that contains a not NULL constraint

"Value is greater than specified precision for this column"

1438 22003 An attempt was made to insert a number of digits with more precision than the column allowed

"Invalid number"

1722 42000 Trying to perform a numeric function on a character

"Integrity constraint Failed"

2291 23000 Attempted to insert a row containing a foreign key that does not match an existing primary key

"Value too large,"

12899 72000 Attempted to insert a value that exceeds the allowable range of the column (for example, too many characters)

"Io Exception"

17002 No Error from Oracle JDBC driver does not correspond to SQLState (NULL)

"Invalid column index"

17003 No


"Invalid column name"

17006 No


"Value Overflow"

17026 No


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.