场景
- 通过命令行更新一波测试数据,奇数行和偶数行有所区分
分析
mod函数的官方文档
MOD(N,M), N % M, N MOD MModulo operation. Returns the remainder of N divided by M.
返回N除以M之后的余数
解决
update `statistic` set date='20180905' where mod(id, 2)=0;
update `statistic` set date='20180906' where mod(id, 2)=1;