日期:2014-05-17 浏览次数:20428 次
存储过程:
?
CREATE PROCEDURE `ClearCoupon`() BEGIN declare today int(16); select UNIX_TIMESTAMP(curdate()) into today; UPDATE coupon SET status=0 WHERE endtime<today; END;
?
?copy到phpmyadmin里面执行,就报错了
SQL 查询: CREATE?PROCEDURE?`ClearCoupon`?(?)?BEGIN?declare?today?INT(?16?)?; MySQL 返回:错误
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3?
?