各种常见javasqlSQLException归纳.docx

上传人:小飞机 文档编号:3357329 上传时间:2023-03-12 格式:DOCX 页数:6 大小:38.99KB
返回 下载 相关 举报
各种常见javasqlSQLException归纳.docx_第1页
第1页 / 共6页
各种常见javasqlSQLException归纳.docx_第2页
第2页 / 共6页
各种常见javasqlSQLException归纳.docx_第3页
第3页 / 共6页
各种常见javasqlSQLException归纳.docx_第4页
第4页 / 共6页
各种常见javasqlSQLException归纳.docx_第5页
第5页 / 共6页
亲,该文档总共6页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《各种常见javasqlSQLException归纳.docx》由会员分享,可在线阅读,更多相关《各种常见javasqlSQLException归纳.docx(6页珍藏版)》请在三一办公上搜索。

1、各种常见javasqlSQLException归纳最近使用Oracle时老是遇到java.sql.SQLException错误,害得我在网上查得累死累活的,所以一口气查了一下几个常见的,在此列了列英文是来自官方的,用中文简单翻译了一下,有一些实在不知道怎么翻译,也没有尝试重现,所以将英文原文一并列出,供有需要的人查阅!ORA-01861: 文字与格式字符串不匹配-ORA-00904: invalid column name 无效列名ORA-00942: table or view does not exist 表或者视图不存在ORA-01400: cannot insert NULL into

2、 不能将空值插入ORA-00936:缺少表达式ORA-00933:SQL 命令未正确结束ORA-01722:无效数字:ORA-06530: ACCESS_INTO_NULLYour program attempts to assign values to the attributes of an uninitialized (atomically null) object.企图将值写入未初化对象的属性ORA-06592: CASE_NOT_FOUNDNone of the choices in the WHEN clauses of a CASE statement is selected,

3、and there is no ELSE clause.case语句格式有误,没有分支语句ORA-06531: COLLECTION_IS_NULLYour program attempts to apply collection methods other than EXISTS to an uninitialized (atomically null) nested table or varray, or the program attempts to assign values to the elements of an uninitialized nested table or var

4、ray.企图将集合填入未初始化的嵌套表中ORA-06511: CURSOR_ALREADY_OPENYour program attempts to open an already open cursor. A cursor must be closed before it can be reopened. Acursor FOR loop automatically opens the cursor to which it refers. So, your program cannot open that cursorinside the loop.企图打开已经打开的指针指针已经打开,要再次

5、打开必须先关闭ORA-00001: DUP_VAL_ON_INDEXYour program attempts to store duplicate values in a database column that is constrained by a unique index.数据库字段存储重复,主键唯一值冲突ORA-01001: INVALID_CURSOR无效指针Your program attempts an illegal cursor operation such as closing an unopened cursor.非法指针操作,例如关闭未打开的指针ORA-01722:

6、INVALID_NUMBER无效数字In a SQL statement, the conversion of a character string into a number fails because the string does not represent a valid number. (In procedural statements, VALUE_ERROR is raised.) This exception is also raised when the LIMIT-clause expression in a bulk FETCH statement does not ev

7、aluate to a positive number.在sql语句中,字符数字类型转换错误,无法将字符串转化成有效数字此错误也可能因为在limit从句表达式中fetch语句无法对应指定数字ORA-01017: LOGIN_DENIED拒绝访问Your program attempts to log on to Oracle with an invalid username and/or password.企图用无效的用户名或密码登录oracleORA-01403: NO_DATA_FOUND 无数据发现A SELECT INTO statement returns no rows, or y

8、our program references a deleted element in a nested table or an uninitialized element in an index-by table. SQL aggregate functions such as AVG and SUM always return a value or a null. So, a SELECT INTO statement that calls an aggregate function never raises NO_DATA_FOUND. The FETCH statement is ex

9、pected to return no rows eventually, so when that happens, no exception is raised.ORA-01012: NOT_LOGGED_ON 未登录Your program issues a database call without being connected to Oracle.程序发送数据库命令,但未与oracle建立连接ORA-06501: PROGRAM_ERROR 程序错误PL/SQL has an internal problem.pl/sql系统问题ORA-06504: ROWTYPE_MISMATCH

10、 行类型不匹配The host cursor variable and PL/SQL cursor variable involved in an assignment have incompatible return types. For example, when an open host cursor variable is passed to a stored subprogram, the return types of the actual and formal parameters must be compatible. ORA-30625: SELF_IS_NULL Your

11、program attempts to call a MEMBER method on a null instance. That is, the built-in parameter SELF (which is always the first parameter passed to a MEMBER method) is null.ORA-06500: STORAGE_ERROR 存储错误PL/SQL runs out of memory or memory has been corrupted.PL/SQL运行内存溢出或内存冲突ORA-06533: SUBSCRIPT_BEYOND_C

12、OUNT 子句超出数量Your program references a nested table or varray element using an index number larger than the number of elements in the collection.ORA-06532: SUBSCRIPT_OUTSIDE_LIMIT 子句非法数量Your program references a nested table or varray element using an index number (-1 for example) that is outside the

13、legal range.ORA-01410: SYS_INVALID_ROWID 无效的字段名The conversion of a character string into a universal rowid fails because the character string does not represent a valid rowid. ORA-00051: TIMEOUT_ON_RESOURCE 资源等待超时A time-out occurs while Oracle is waiting for a resource. ORA-01422: TOO_MANY_ROWS 返回超过

14、一行A SELECT INTO statement returns more than one row.ORA-06502: VALUE_ERROR 值错误An arithmetic, conversion, truncation, or size-constraint error occurs. For example, when your program selects a column value into a character variable, if the value is longer than the declared length of the variable, PL/SQL aborts the assignment and raises VALUE_ERROR. In procedural statements, VALUE_ERROR is raised if the conversion of a character string into a number fails. (In SQL statements, INVALID_NUMBER is raised.) ORA-01476: ZERO_DIVIDE 除0错误Your program attempts to divide a number by zero

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号