问题标签 [sqlcode]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
24 浏览

sql - Sqlerrm() 与 Sqlcode()

因为 Sqlerrm() 返回由 orecle 提供的消息和代码。

异常 1: 当数据未找到错误 ouccers 时,就像在隐式游标中一样,我们正在编写异常处理,例如 dbms_ou..(sqlerrm());

输出: ORA-01403: 未找到数据,对于 Dbms_output..(sqlcode());--当相同的异常时未找到数据

输出: 100

异常2: 当too_many_rows异常发生时,它返回

输出:当 sqlerrm(): ORA-01422:exact fetch 返回超过请求的行数时..

输出:当sqlcode():-1422

所以,在第一种情况下 sqlcode() 返回 100 而在 too_many_rows 它返回 -1422 (这是 oracle 提供的代码)。??

所以这是我的问题什么是正确的答案。什么 sqlcode() 函数返回一些由 oracle 或任何匿名数字提供的代码?