简体   繁体   English

MySQL:选择差值大于x的TIMEDIFF值

[英]MySQL: Select TIMEDIFF values where the difference is greater than x

SELECT TIMEDIFF(start, end) AS difference

The above value would return 00:10:00 if the start and end values were 01:05:00 , 01:15:00 . 上述值将返回00:10:00如果起点和终点值分别为01:05:0001:15:00

How can I change my SQL statement so that it only selects differences that are greater than 00:05:00 ? 如何更改我的SQL语句,以便它只选择大于00:05:00差异?

WHERE TIME_TO_SEC(TIMEDIFF(start, end)) > 300

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM