select B.dayHour from (SELECT one.hours + two.hours AS dayHour FROM (SELECT 0 hours UNION ALL SELECT 1 hours UNION ALL SELECT 2 hours UNION ALL SELECT 3 hours UNION ALL SELECT 4 hours UNION ALL SELECT 5 hours UNION ALL SELECT 6 hours UNION ALL SELECT 7 hours UNION ALL SELECT 8 hours UNION ALL SELECT 9 hours) one CROSS JOIN (SELECT 0 hours UNION ALL SELECT 10 hours UNION ALL SELECT 20 hours) two WHERE (one.hours + two.hours) < 24) B
order BY B.dayHour
mysql查询24小时 数据 没有用0代替
最新推荐文章于 2023-07-18 12:21:07 发布