我正在运行以下查询,但TIMESTAMPDIFF函数有一个随机结果返回一个负值,只有一个:
select JOB_ID,FROM_UNIXTIME(TIME_STARTED/1000) as TIME_STARTED,FROM_UNIXTIME(TIME_FINISHED/1000) as TIME_FINISHED,TIMESTAMPDIFF(SECOND,FROM_UNIXTIME(TIME_STARTED
)" insert="false" name="duration" update="false" />在这里,这个公式从我的数据中返回一些格式为当我试图在'Duration‘字段中加载这个值时,我得到了异常,它有'java.sql.Time’类型,它给了我这个异常。"Generic JDBC exception - Bad format for Time &
SELECT TIMESTAMPDIFF(MINUTE, `Opened`, NOW()) as PastDue FROM `Task`SELECT COUNT(TIMESTAMPDIFF(MINUTE, `Opened`, NOW())) < 0 as PastDue FROM `Task`
它现在返回,现在有两行负结果,所以它应该返回两行,但是它总是