CREATE TRIGGER `trigger_name` AFTER INSERT ON `table_name` FOR EACH ROW
      BEGIN
          constants
      END;
      Sql language logo

      create trigger

      SQL public snippets

      The trigger created in the code example will execute once for each row in the table_name table. The trigger will execute the code block that begins with the &[USER_INPUT:5: -- Use NEW and OLD constants for access to row] keyword. The two constants used in the code block are NEW and OLD. NEW represents the current row number and OLD represents the row number for the row that was inserted before the current row.

      Shortcut: s_trig

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.