我需要在單個表中選擇max(時間)和一些特定的小時數。我嘗試過這樣的事情。任何想法?如何在IN子句中使用max函數
SELECT * FROM ara WHERE date = '2017-03-31' and time in('07:00:00','13:00:00','19:00:00',max(tme)) order by time desc
SELECT * FROM ara WHERE date = '2017-03-31' and (time = '07:00:00' or time = '13:00:00' or time = '19:00:00'or time = max(time)) order by time desc
你要帶那個'MAX(TME)'而來? –