【发布时间】:2016-12-10 15:29:44
【问题描述】:
假设我有一个 for 循环
for i in array.first .. array.last loop
boolean := c(i) > d(i);
if boolean --is true then
exit the loop immediately and also exit the entire procedure
else if the boolean is never true til the end of the loop, exit the loop
and keep running other scripts in this procedure.
我知道'EXIT'关键字需要在循环内部才能在满足条件时退出循环。 'RETURN' 需要在循环之外才能退出程序。
但是如果我把'RETURN'放在循环之外,那么我认为无论循环的结果是什么,当循环结束时它都会退出整个过程?
【问题讨论】:
标签: sql oracle loops plsql procedure