問題詳情

QUESTION 43Examine the trigger:CREATE OR REPLACE TRIGGER Emp_countAFTER DELETE ON Emp_tabFOR EACH ROWDELCAREn INTEGER;BEGINSELECT COUNT(*)INTO nFROM Emp_tab;DBMS_OUTPUT.PUT_LINE(' There are now ' || a ||' employees,');END;This trigger results in an error after this SQL statement is entered:DELETE FROM Emp_tab WHERE Empno = 7499;How do you correct the error?long
(A)Change the trigger type to a BEFORE DELET
(E)
(B)Take out the COUNT function because it is not allowed in a trigger.
(C)Remove the DBMS_OUTPUT statement because it is not allowed in a trigger.
(D)Change the trigger to a statement-level trigger by removing FOR EACH ROW.

參考答案

答案:D
難度:非常簡單1
統計:A(0),B(0),C(0),D(1),E(0)