This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Can someone explain when to use Before Trigger and when After Trigger????
in SQL / MySQL Triggers
Could someone explain when to use Before Trigger and when After Trigger????
I'm pretty confused about this.
1 answers ( 0 marked as helpful)
Thanks for reaching out.
The difference between the AFTER and BEFORE trigger stands in the point in time that we would apply the condition imposed by the trigger. If we need a check before the DML, we would need a BEFORE trigger. If we need to perform an action after the DML, we use AFTER trigger.
Hope this helps.
Submit an answer
Why did you not do not null, primary key and auto increment for customer id in the solution?
Resolved: M query fetch time increased after creating an index for the salaries table!