create procedure check_order(p_order_num int)
define p_ship_date like orders.ship_date;
set debug file to “/tmp/trace_check”;
trace on;
select ship_date into p_ship_date
from orders
where order_num = p_order_num;
if p_ship_date is null then
trace “ship date is null”;----------输出调试语句
execute procedure notify_shipping(p_order_num);
end if;
trace off;
end procedure;
本文介绍了一个用于检查特定订单发货日期的过程。此过程通过输入订单号参数来查询数据库中对应订单的发货日期,并在发货日期为空时调用另一个过程进行通知。

5013

被折叠的 条评论
为什么被折叠?



