In MySQL, which of the following statements correctly creates a trigger that…

PYQ IBPS SO CRP SPL-XIV (2024)

In MySQL, which of the following statements correctly creates a trigger that executes automatically before inserting a row into the Employee table?

  1. A.

    CREATE TRIGGER trg_before_insert
    BEFORE INSERT ON Employee
    FOR EACH ROW
    SET @x = 1;

  2. B.

    CREATE TABLE trg_before_insert
    BEFORE INSERT ON Employee;

  3. C.

    TRIGGER trg_before_insert
    ON Employee
    BEFORE INSERT;

  4. D.

    CREATE VIEW trg_before_insert
    BEFORE INSERT ON Employee;

  5. E.

    CREATE INDEX trg_before_insert
    ON Employee(Before_Insert);

Attempted by 260 students.

Sign up free to check your answer

Sign up free

Explore the full course: Niacl Ao It Specialist

Loading lesson…