Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id INT
- time_stamp timestamp
- status INT
- DELIMITER $$
- CREATE TRIGGER new_table_AINS
- BEFORE INSERT ON new_table
- FOR EACH ROW begin
- DECLARE now_value timestamp;
- SET @now_value = current_timestamp;
- UPDATE new_table SET new.status = 0 where @now_value = new.time_stamp + interval 48 hour;
- END$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement