Query 1
SELECT SessionInfo.IVRSessionInfoID
FROM SessionInfo
WHERE SessionCallTime BETWEEN UNIX_TIMESTAMP('2013-08-01 00:00:00')
AND UNIX_TIMESTAMP('2013-08-01 23:59:59')
ORDER BY SessionInfo.SessionCallTime DESC;
Query 2
SELECT SessionInfo.IVRSessionInfoID
FROM SessionInfo
WHERE ( SessionInfo.SessionCallTime BETWEEN '2013-08-01 00:00:00'
AND '2013-08-01 23:59:59' )
ORDER BY SessionInfo.SessionCallTime DESC;
What is the difference? Why does the first query give 0 rows and the second give records?
In this table there are 20000 rows between these two dates.
SessionCallTime
? – ypercubeᵀᴹ Oct 1 '13 at 12:53