MySQL Forums
Forum List  »  Triggers

Create a trigger that prevents updating all rows in a table
Posted by: david lee
Date: August 29, 2017 12:08PM

I'm new to triggers, and still a new web developer.

I have an "Emails" table and there is a bug that sets the 'sent_at' column to today's date for all the rows (and there are over a million rows)
This happens every few months or so and it's a pain in the ass to fix.

Is there a trigger I can write that will prevent my "Emails" table from updating all the rows? It can be done in SQL server, but I haven't found anything in mysql.

Options: ReplyQuote


Subject
Views
Written By
Posted
Create a trigger that prevents updating all rows in a table
1467
August 29, 2017 12:08PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.