查看存储过程
show create procedure user_driving_license_bind_total;
删除存储过程
drop procedure if exists user_driving_license_bind_total;
创建存储过程
DELIMITER ;;
CREATE DEFINER=`weixin`@`%` PROCEDURE `user_driving_license_bind_total`(IN `preDay` INT)
BEGIN
select count(*) as count from user_driving_license_bind where update_time < ((unix_timestamp()-(preDay-1)*86400-unix_timestamp()%86400-8*3600))*1000;
END;;
DELIMITER ;;
调用存储过程
call user_driving_license_bind_total(1)