Oracle
1Z0-882 · Question #30
1Z0-882 Question #30: Real Exam Question with Answer & Explanation
The correct answer is B. An error results because the NEW keyword cannot be used in a DELETE trigger.. See the full explanation below for the reasoning.
Question
You wish to create a trigger on the country table. It will populate two session variables based on the row that is deleted: @old _countryNames with the value of the Name field @old _countryName with the value of the code field You may assume that only one row is ever deleted at a time. CREATE TRIGGER Country_ad AFTER DELETE ON Country FOR EACH ROW SET @old _CountryName= NEW.Name, @ old _CountryCode=NEW.Code; What is the outcome of the CREATE TRIGGER statement?
Options
- AThe trigger will be created successfully.
- BAn error results because the NEW keyword cannot be used in a DELETE trigger.
- CAn error results because FOR EACH ROW is invalid syntax.
- DAn error results because a BEGIN. . .END block is required.
Community Discussion
No community discussion yet for this question.