两道Oracle试题,第一题有点疑惑

img

1.You are coding a PL/SQL block. PROC_A calls PROC B, which then calls PRoC C, and PROC B has no exception handler. If you wanted to prevent the PROC A procedure from failing due to a situation in PROC_B where the divisor in a division statement was zero, how would you address this in your code?
A .Use an if %zero_divide statement immediately following the math operation.
B. Code a when zero divide exception handler in PROC C.
C .Code a when others exception handler in PROC A.
C.ode a when others exception handler in PROC_C.

  1. You are developing SQL statements for the application. Which of the following SQL operations requires the use of a subquery

第一题没判断出来,第二题是A么。

英语不好路过不确定翻译的对不对,所以不确定回答的对不对= =,第二题A
第一题貌似是你正在写一段 PL/SQL代码,存储过程A中 调用存储过程B,然后调用存储过程C(我的理解是在A中调用了B和C),B没有异常处理,如果你想要防止A因为存储过程B中被除数为零运行失败,你将在如何代码中处理这个问题
答案中 A 在数学计算后使用if语句,显然不对,在数学计算那边就会异常
B 在存储过程C里面进行0不能做除数的异常处理,显然不对,除是在存储过程B里的
C 在存储过程A里面对所有异常进行处理,可以实现
D 在存储过程C中对所有的异常进行处理,和B一样,异常根本不发生在C里面
所以最终选C