Mysql 怎么判断时间的?

a2535455872 2012-02-24 05:00:35
比如

select * from test a where a.date > 现在时间


我要查询比现在时间大的数据
...全文
267 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
a2535455872 2012-02-25
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 by226t 的回复:]
select * from test a where a.date > curdate() ,SQL里面是getdate()
[/Quote]
-------------------
不好意思,结账的时候 没注意到你,下次补还给你。
叶子 2012-02-24
  • 打赏
  • 举报
回复
now() 
sysdate()
curdate()


MYSQL 中的时间函数也比较多
http://hi.baidu.com/teapeople/blog/item/e893fd005407bc0d738da5dc.html
by226t 2012-02-24
  • 打赏
  • 举报
回复
select * from test a where a.date > curdate() ,SQL里面是getdate()
dawugui 2012-02-24
  • 打赏
  • 举报
回复
[Quote=引用楼主 a2535455872 的回复:]
比如

select * from test a where a.date > 现在时间


我要查询比现在时间大的数据
[/Quote]

select * from test a where a.date > curdate()
mayuanf 2012-02-24
  • 打赏
  • 举报
回复
getdate()
百年树人 2012-02-24
  • 打赏
  • 举报
回复
select * from test a where a.date > current_timestamp(); 

22,300

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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