Which one is correct?

Examine the code examples. Which one is correct?

Examine the code examples. Which one is correct?

A.
CREATE OR REPLACE TRIGGER authorize_action
BEFORE INSERT ON EMPLOYEES
CALL log_execution;
/

B.
CREATE OR REPLACE TRIGGER authorize_action
BEFORE EMPLOYEES INSERT
CALL log_execution;

C.
CREATE OR REPLACE TRIGGER authorize_action
BEFORE EMPLOYEES INSERT
CALL log_execution;

D.
CREATE OR REPLACE TRIGGER authorize_action
CALL log_execution BEFORE INSERT ON EMPLOYEES;
/

Explanation:
Answer A is the correct syntax for creating a Trigger and calling a procedure
Incorrect answers:
Answer B is incorrect. This is incorrect syntax for creating a Trigger
Answers C and D are incorrect syntax and will result in an error



Leave a Reply 1

Your email address will not be published. Required fields are marked *


fj

fj

A. is incorrect syntax because the call statement is suffixed with a semicolon (;).
If you perform to compile this you will get an error.

The right answer is below;
CREATE OR REPLACE TRIGGER authorize_action
BEFORE INSERT ON EMPLOYEES
CALL log_execution
/