1Z0-882 · Question #30
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…
Sign in or unlock 1Z0-882 to reveal the answer and full explanation for question #30. The question stem and answer options stay visible for context.
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.
Unlock 1Z0-882 to see the answer
You've previewed enough free 1Z0-882 questions. Unlock 1Z0-882 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.