mysql 匹配奇数、偶数行数据

匹配奇数行:
select t1.TagDesc, SUM(t1.TimeDiff) AS "运行时间" from temp1_status t1 WHERE id&1
select t1.TagDesc, SUM(t1.TimeDiff) AS "运行时间" from temp1_status t1 WHERE mod(id, 2)=1;
匹配偶数行:
SELECT t1.ID, t1.TagDesc, FROM temp1_status t1  WHERE MOD ( id, 2 ) =0
原文地址:https://www.cnblogs.com/chuijingjing/p/12094974.html