You'll want to use an exit handler for that if writing this solely in SQL!
你想用一个出口处理程序那如果写这只在SQL !
The INSERT error transfers control to the exit handler for that SQLSTATE code.
INSERT错误将控制转移到 SQLSTATE代码的退出处理程序。
This routine can be called as a part of the application's exit handler or clean up routines.
应用程序的退出处理函数或清理例程可以调用这个例程。
When the INSERT statement fails with the error code specified in the DECLARE exit handler statement, control passes to the handler, and the procedure is exited.
当insert语句失败并且错误代码在DECLAREEXIT handler语句中指定,那么控制将传递到处理程序,而过程将退出。
Listing 13 demonstrates how a specific error can transfer control to the exit handler where a user-defined error message is returned depending on the value of the SQLCODE.
清单13展示了一个特定的错误如何将控制转移给退出处理程序,其中根据SQLCODE的值返回用户定义的错误消息。
To avoid this, an un-caught handler can decide whether to invoke an abort or a thread-exit call.
为了避免这一点,未捕获处理程序可以决定是请求异常中止调用,还是请求线程退出调用。
In the Console view you can see the log trace from the Delimited Data Handler entry followed by the output from the target service and finally the Delimited Data Handler exit log trace.
在控制台视图中可以看到,与DelimitedDataHandler进入相关的日志跟踪信息后面紧跟来自目标服务的输出,而最后是DelimitedDataHandler退出的日志跟踪信息。
Listing 12 shows a handler that will exit the procedure when SQL warnings and the not found conditions are encountered.
清单12展示了一个处理程序,它将在遇到SQL警告和notfound条件时退出过程。
The signal handler is called with a value of 18 (SIGCHLD), the child's exit is acknowledged, and the parent goes back to its sleep (60).
然后使用值18 (SIGCHLD)来调用信号处理程序,确认子进程的退出,并且父进程返回到sleep (60)。
The signal handler is called with a value of 18 (SIGCHLD), the child's exit is acknowledged, and the parent goes back to its sleep (60).
然后使用值18 (SIGCHLD)来调用信号处理程序,确认子进程的退出,并且父进程返回到sleep (60)。
应用推荐