当前位置: 技术问答>java相关
日期比较语句怎么写?
来源: 互联网 发布时间:2015-10-29
本文导语: 要在数据库里比较日期,怎么样写呢? select * from main where '1'='1' and up_time in(2001-01-01,2002-12-31) 和 select * from main where '1'='1' and up_time>2001-01-01 and up_time'2001-01-01' and up_time
要在数据库里比较日期,怎么样写呢?
select * from main where '1'='1' and up_time in(2001-01-01,2002-12-31)
和
select * from main where '1'='1' and up_time>2001-01-01 and up_time'2001-01-01' and up_time
select * from main where '1'='1' and up_time in(2001-01-01,2002-12-31)
和
select * from main where '1'='1' and up_time>2001-01-01 and up_time'2001-01-01' and up_time