Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. id INT
  2. time_stamp timestamp
  3. status INT
  4.  
  5. DELIMITER $$
  6. CREATE TRIGGER new_table_AINS
  7. BEFORE INSERT ON new_table
  8. FOR EACH ROW begin
  9. DECLARE now_value timestamp;
  10. SET @now_value = current_timestamp;
  11. UPDATE new_table SET new.status = 0 where @now_value = new.time_stamp + interval 48 hour;
  12. END$$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement