可以使用该PRAGMA EXCEPTION_INIT名称将异常名称与其他可以预测的 Oracle 错误代码相关联。 知道错误代码后,可以将其用于PRAGMA EXCEPTION_INIT该错误,并专门为该错误编写处理程序。 每当尝试转换 PL/SQL 代码时不PRAGMA EXCEPTION_INIT在其参数部分中定义错误号,SSMA 将生成错误消息,因为它
PRAGMA在PLSQL里有4个关键词的用法: (1)autonomous_transaction-自治事务,该程序块的commit或rollback不影响外层事务; (2)exception_init--错误代码与declare的标识符关联; (3)restrict_references--程序包的纯度级别; (4)serially_reusable--程序包级别的数据在引用之间不保留。 到目前... 查看原文 Oracle12c--...
PRAGMA在PLSQL里有4个关键词的用法: (1)autonomous_transaction-自治事务,该程序块的commit或rollback不影响外层事务; (2)exception_init--错误代码与declare的标识符关联; (3)restrict_references--程序包的纯度级别; (4)serially_reusable--程序包级别的数据在引用之间不保留。 到目前...翻译...
For example, In PL/SQL, the pragma EXCEPTION_INIT tells the compiler to associate an exception name with an Oracle error number. === That allows you to refer to any internal exception by name and to write a specific handler for it.: DECLARE deadlock_detected EXCEPTION; PRAGMA EXCEPTION_INI...
Application-declared exceptions that are only raised and caught locally within a layer of entry into PL/SQL do not need the EXCEPTION_INIT pragma. The RAISE_APPLICATION_ERROR procedure and associated -20000 to -20999 range of error numbers should be used by application-declared exceptions that are...
CREATE PACKAGE loans AS FUNCTION balance(account NUMBER) RETURN NUMBER; PRAGMA RESTRICT_REFERENCES (balance, WNDS, RNPS); END loans; / DROP PACKAGE loans; Related Topics AUTONOMOUS_TRANSACTION Pragma,EXCEPTION_INIT Pragma,SERIALLY_REUSABLE Pragma...