简体   繁体   中英

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 .

How can I change my SQL statement so that it only selects differences that are greater than 00:05:00 ?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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