日期:2014-05-16 浏览次数:20640 次
CREATE TABLE tab1( tab1_id varchar(11), num int ); DELIMITER // CREATE EVENT e_hourly ON SCHEDULE EVERY 1 MINUTE COMMENT 'Clears out sessions table each hour.' DO BEGIN -- DELETE FROM site_activity.sessions; update tab1 set num=num+1 WHERE tab1_id='sdfsd'; END;