mysql 查詢本週一到現在的數據

select CONCAT(subdate(curdate(),date_format(curdate(),'%w')-1),' 00:00:00')

 

SELECT * from 表 where INSERT_TIME >= CONCAT(subdate(curdate(),date_format(curdate(),'%w')-1),' 00:00:00') and INSERT_TIME <= now()

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章