宗小宗-PHP程序猿

欢迎各位朋友前来,如果我的文章中有不对的地方,还望指正;如需转载,请注明原处

关于MySQL中时间格式和取零点的问题

select * from order where create_time>'2016-05-21 00:00:00'; 不包含2016-05-21 00:00:00时的订单

 

select * from order where create_time>'2016-05-21'; 包含2016-05-21 00:00:00时的订单

等价于

select * from order where create_time>='2016-05-21 00:00:00';

posted @ 2016-05-23 11:20  宗小宗  阅读(2732)  评论(0编辑  收藏  举报