mysql根据指定日期查询数据

SELECT
  id,
  DATE_FORMAT(create_time, '%Y-%c-%d %H:%i:%S')
FROM epc_mes_item
WHERE create_time = '2018-11-19 23:00:20';
 
SELECT
  id,
  DATE_FORMAT(create_time, '%Y-%c-%e')
FROM epc_mes_item
WHERE DATE_FORMAT(create_time, '%Y-%c-%d') >= '2018-11-19';


 

你可能感兴趣的:(java,数据库,sql,数据库,java)