Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在从 MySQL 表中查询一些数据,其中一列的数据类型为 DATETIME。现在,当我进行查询时,它包括一个烦人的00:00:00时间。进行选择时如何排除此时间部分?
00:00:00
利用DATE
DATE
SELECT DATE(columnName) FROM....
或者DATE_FORMAT
DATE_FORMAT
SELECT DATE_FORMAT(NOW(),'%Y-%m-%d');