我有一列時間數據類型,我願意比較它,但我不知道如何比較它。像我想知道的那樣時間大於10:30:00。我如何檢查它?我編寫了這個查詢,但它沒有顯示任何結果,儘管數據可用。我在做什麼錯如何在mysql中比較時間
select PK, userID, lr.Date, lr.Time, Half, lr.InOut, Op_UserID, About
from loginrecord lr
where lr.Date Between '2017-05-17' AND '2017-05-17'
and lr.InOut = 1
and lr.Time > '10:30:00'
http://stackoverflow.com/questions/8458290/mysql-select-data-from-database-between-two-dates看到這個希望它有幫助。 –