SQL (Structured Query Language) Question:

Examine this database trigger?

Tweet Share WhatsApp

Answer:

52. CREATE OR REPLACE TRIGGER prevent_gross_modification
53. {additional trigger information}
54. BEGIN
55. IF TO_CHAR(sysdate, DY) = MON
56. THEN
57. RAISE_APPLICATION_ERROR(-20000,Gross receipts cannot be deleted on Monday);
58. END IF;
59. END;

This trigger must fire before each DELETE of the GROSS_RECEIPT table. It should fire only once for the entire DELETE statement. What additional information must you add?
1. BEFORE DELETE ON gross_receipt
2. AFTER DELETE ON gross_receipt
3. BEFORE (gross_receipt DELETE)
4. FOR EACH ROW DELETED FROM gross_receipt

Download SQL PDF Read All 172 SQL Questions
Previous QuestionNext Question
Which procedure can be used to create a customized error message?Procedure and Functions are explicitly executed. This is different from a database trigger. When is a database trigger executed?