datediff在查询中的两个日期列之间给出0差异

时间:2014-11-07 19:35:34

标签: mysql datediff

我有这个问题:

SELECT qanswer.annoid, qanswer.ansid, qanswer.date ansdate, content.date quesdate,
   DATEDIFF(answer.date, content.date ) responsetime 
FROM qanswer, content 
WHERE qanswer.annoid = content.id 
GROUP BY qanswer.annoid 
ORDER BY qanswer.annoid, qanswer.date ASC 

datediff函数在名为responsetime的列中提供所有零条目。我希望得到ansdate和quesdate之间的区别。

0 个答案:

没有答案