Mysql获取到当前时间,转换为整形,并存储到某定义变量中!!
怎么写MYSQL语句?
SQL code
DECLARE NowData INT;
select CAST(date_format(now(),'%Y%m%d') AS INT )INTO NowData;
求修改!感激不尽!!!
------解决方案--------------------SELECT UNIX_TIMESTAMP(now()) INTO NowData
------解决方案--------------------
select curdate()+0 就行了。