Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
控制存储过程中的错误处理。
Stop 发现错误时立即停止执行。
Conditional 如果过程使用 ON EXCEPTION RESUME,则跟在错误后面的语句处理该错误,继续执行,否则就退出。
Continue 继续执行,无论后面是什么语句。如果有多个错误,则返回在存储过程中所遇到的第一个错误。
Conditional
对 JConnect 连接,继续执行
此选项控制存储过程中的错误处理。
使用 on_tsql_error 的 Conditional 和 Continue 设置的目的都是为了与 Adaptive Server Enterprise 兼容,而 Continue 可最近似地模拟 Adaptive Server Enterprise 的行为。为了早一些报告错误,请在创建新的 Transact-SQL 存储过程时使用 Conditional 设置。
当此选项设置为 Stop 或 Continue 时,它会取代 continue_after_raiserror 选项的设置。然而,当此选项设置为 Conditional(缺省值)时,RAISERROR 语句后的行为由 continue_after_raiserror 选项的设置决定。