create trigger

    0

    0

    lucycodes42

    SQL public snippets

    This code creates a trigger named "trigger_name" that will fire after an INSERT or UPDATE statement is executed against table_name. The trigger will be fired after the new values for columns &[USER_INPUT:2:AFTER] and &[USER_INPUT:3:INSERT] are populated from the values of column &[USER_INPUT:4:table_name]. The trigger will also have a BEFORE row clause that will fire before the actual INSERT or UPDATE statement is executed.

    Shortcut: s_trig

    DROP TRIGGER IF EXISTS `trigger_name`;
    CREATE TRIGGER `${1}` AFTER INSERT ON `table_name` FOR EACH ROW
    BEGIN
        constants
    END;
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.