nerdexam
Oracle

1Z0-147 · Question #8

Examine this code: CREATE OR REPLACE TRIGGER secure_emp BEFORE LOGON ON employees BEGIN IF (TO_CHAR(SYSDATE, 'DY') IN ('SAT', 'SUN')) OR (TO_CHAR(SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' AND '18:00')…

The correct answer is E. This is an invalid trigger. See the full explanation below for the reasoning.

Question

Examine this code: CREATE OR REPLACE TRIGGER secure_emp BEFORE LOGON ON employees BEGIN IF (TO_CHAR(SYSDATE, 'DY') IN ('SAT', 'SUN')) OR (TO_CHAR(SYSDATE, 'HH24:MI') NOT BETWEEN '08:00' AND '18:00') THEN RAISE_APPLICATION_ERROR(-20500, 'You may insert into the EMPLOYEES table only during business hours.'); END IF; END; / What type of trigger is it?

Options

  • ADML trigger
  • BINSTEAD OF trigger
  • Capplication trigger
  • Dsystem event trigger
  • EThis is an invalid trigger.

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    8% (2)
  • C
    13% (3)
  • E
    75% (18)

Community Discussion

No community discussion yet for this question.

Full 1Z0-147 Practice