1.sqlcode = -1002 异常原因
官方解释:
| ORA-01002: | fetch out of sequence |
| Cause: | In a host language program, a FETCH call was issued out of sequence. A successful parse-and-execute call must be issued before a fetch. This can occur if an attempt was made to FETCH from an active set after all records have been fetched. This may be caused by fetching from a SELECT FOR UPDATE cursor after a commit. A PL/SQL cursor loop implicitly does fetches and may also cause this error. |
| Action: | Parse and execute a SQL statement before attempting to fetch the data. |
在一个select for 循环中,如修改提交了数据,那么可能出现这个错误。
ORA-01002异常解析
本文详细解析了ORA-01002异常的出现原因,即在未成功解析并执行SQL语句前尝试获取数据,或在SELECT FOR UPDATE游标后提交时发生错误。常见于PL/SQL游标循环中。
1048

被折叠的 条评论
为什么被折叠?



