Complete the code to create an AFTER INSERT trigger on the table 'orders'.
CREATE TRIGGER after_insert_order
AFTER [1] ON orders
FOR EACH ROW EXECUTE FUNCTION log_order_insert();The trigger should fire after an INSERT operation, so the correct keyword is INSERT.
Complete the code to specify the timing of the trigger as AFTER.
CREATE TRIGGER update_log
[1] UPDATE ON customers
FOR EACH ROW EXECUTE FUNCTION log_update();The trigger timing must be AFTER to run after the UPDATE operation completes.
Fix the error in the trigger creation by choosing the correct keyword for the trigger event.
CREATE TRIGGER after_delete_log
AFTER [1] ON employees
FOR EACH ROW EXECUTE FUNCTION log_delete();The trigger is named 'after_delete_log' and should fire after a DELETE operation, so the correct event is DELETE.
Fill both blanks to create an AFTER UPDATE trigger that fires for each row.
CREATE TRIGGER after_update_status [1] UPDATE ON orders FOR EACH [2] EXECUTE FUNCTION update_status_log();
The trigger must be AFTER the UPDATE, and it should fire for each ROW affected.
Fill all three blanks to create an AFTER DELETE trigger on the 'products' table that fires for each row and calls the correct function.
CREATE TRIGGER [1] [2] DELETE ON products FOR EACH [3] EXECUTE FUNCTION log_product_delete();
The trigger name is after_delete_product, the timing is AFTER, and it fires for each ROW.