mysql数据库 查询指定某天的数据

mysql数据库 查询指定某天的数据,第1张

select * from table where FROM_UNIXTIME(time, '%Y-%m-%d')=date_format('2019-08-16', '%Y-%m-%d')

mysql中怎么查询一周内,三个月内\x0d\x0a使用sql语句查询日期在一周内的数据\x0d\x0aselect * from ShopOrder where datediff(week,ordTime,getdate()-1)=0 //查询当天日期在一周年的数据\x0d\x0aselect * from ShopOrder where datediff(day,ordTime,getdate()-1)=0 //查询当天的所有数据\x0d\x0a SELECT * FROM A where datediff(d,datetime,getdate()) 回答于 2022-12-11


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/6151291.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-03-16
下一篇 2023-03-16

发表评论

登录后才能评论

评论列表(0条)

保存