nerdexam
PostgreSQL_CE

PGCES-02 · Question #74

Select two suitable statements regarding the following SQL statement: CREATE TRIGGER trigger_1 AFTER UPDATE ON sales FOR EACH ROW EXECUTE PROCEDURE write_log();

The correct answer is A. It is defining a trigger "trigger_1". E. 'DROP TRIGGER trigger_1 ON sales;' deletes the defined trigger. See the full explanation below for the reasoning.

Question

Select two suitable statements regarding the following SQL statement:

CREATE TRIGGER trigger_1 AFTER UPDATE ON sales FOR EACH ROW EXECUTE PROCEDURE write_log();

Options

  • AIt is defining a trigger "trigger_1".
  • BEvery time 'UPDATE' is executed on the "sales" table, the "write_log" function is called once.
  • CThe "write_log" function is called before 'UPDATE' takes place.
  • D'UPDATE' is not executed if "write_log" returns NULL.
  • E'DROP TRIGGER trigger_1 ON sales;' deletes the defined trigger.

How the community answered

(25 responses)
  • A
    76% (19)
  • B
    12% (3)
  • C
    4% (1)
  • D
    8% (2)

Community Discussion

No community discussion yet for this question.

Full PGCES-02 Practice