编码不一致:
Illegal mix of collations (utf8mb4_general_ci,IMPLICIT) and (utf8mb4_unicode_ci,IMPLICIT) for operation ‘=’
在右边加上utf8mb4_unicode_ci;
删除上月数据(天)
delete from tb_sale_refund_comparison_day where day >= date_sub(date_sub(curdate(),interval extract(day from curdate())-1 day),interval 1 month);
删除上月数据(月)
delete from cst.tb_sale_refund_statistic where month = date_format(date_sub(curdate(), INTERVAL 1 MONTH),’%Y-%m’)
日常mysql问题(eg:连表编码错误,获取上月第一天等)
最新推荐文章于 2021-01-27 11:52:30 发布