mysql drop trigger 1

mysql drop trigger

     DROP TRIGGER [IF EXISTS] [schema_name.]trigger_name;

Here is what the above code is Doing:
1. Create a trigger that will fire before an insert on the table.
2. The trigger will check if the inserted row has a value for the column ‘id’.
3. If the inserted row does not have a value for the column ‘id’, then the trigger will set the value of the column ‘id’ to the next value in the sequence.
4. The trigger will then insert the row into the table.

Similar Posts