To which type must you convert the trigger to correct the error?

This statement fails when executed:
CREATE OR REPLACE TRIGGER CALC_TEAM_AVG
AFTER INSERT ON PLAYER
BEGIN
INSERT INTO PLAYER_BATSTAT (PLAYER_ID,
SEASON_YEAR,AT_BATS,HITS)
VALUES (:NEW.ID, 1997, 0,0);
END;
To which type must you convert the trigger to correct the error?

This statement fails when executed:
CREATE OR REPLACE TRIGGER CALC_TEAM_AVG
AFTER INSERT ON PLAYER
BEGIN
INSERT INTO PLAYER_BATSTAT (PLAYER_ID,
SEASON_YEAR,AT_BATS,HITS)
VALUES (:NEW.ID, 1997, 0,0);
END;
To which type must you convert the trigger to correct the error?

A.
Row

B.
Statement

C.
ORACLE FORM trigger

D.
Before

Explanation:
The qualifiers :OLD and :NEW can only be used with row triggers. If you attempt to create a statement level trigger using the qualifiers, Oracle generates the following error message at compile time:
ORA-01912: ROW keyword expected
Incorrect Answers
B: This triggers is a Statement level trigger by default and that is why it is throwing an error.
C: This needs to be a database trigger ROW level Trigger not a Application client-side Trigger.
D: The Trigger timing is not relevant to the problem.



Leave a Reply 0

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