Unanswered: Trigger that deletes the last row inserted if the previous value is the same?
I want to create a trigger that checks the last value of a column. If it is the same, it shouldn't insert (well, or deletes that row) it.
All I got for now:
CREATE TRIGGER `checkrow` BEFORE INSERT ON `table6` FOR EACH ROW
if inserted.sha1(column1) == select sha1(column1) from table6 order by id desc limit 1 then