MySQL Forums
Forum List  »  Triggers

Re: Delete last row inserted
Posted by: sdgbfdsg fdhgfdhds
Date: April 09, 2014 08:05AM

I have this so far:

USE database;
DELIMITER $$
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
delete inserted.column1;
end if

Options: ReplyQuote


Subject
Views
Written By
Posted
2006
April 07, 2014 08:27AM
Re: Delete last row inserted
1312
April 09, 2014 08:05AM


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.