mysql怎么取当天的记录数

chenhongxin 2010-07-08 04:20:33
大家好,我想取当天的记录数,怎么取。我表里有这样一个字段TIMESTAMP.
...全文
207 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
hitexam 2010-07-08
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 wwwwa 的回复:]

select count(*) from tt where date(TIMESTAMP)=CURDATE()
[/Quote]
1楼的不错啊
paula2008 2010-07-08
  • 打赏
  • 举报
回复
select count(*) from table1 where substring(字段,1,10)>=substring(now(),1,10) ;
hao1hao2hao3 2010-07-08
  • 打赏
  • 举报
回复
select * from tablename where TIMESTAMP>=CURDATE() ;
chenhongxin 2010-07-08
  • 打赏
  • 举报
回复
就是取出当天的记录。
ACMAIN_CHM 2010-07-08
  • 打赏
  • 举报
回复
select count(*) from table1 where 字段TIMESTAMP>=CURDATE() ;
WWWWA 2010-07-08
  • 打赏
  • 举报
回复
select count(*) from tt where date(TIMESTAMP)=CURDATE()

56,677

社区成员

发帖
与我相关
我的任务
社区描述
MySQL相关内容讨论专区
社区管理员
  • MySQL
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧