三种数据库对日期格式的区间查询

来源:互联网 发布:淘宝服务市场官网 编辑:程序博客网 时间:2024/04/30 07:27

www.u8686.com-信息发布平台

三种数据库对日期格式的区间查询

 

 

查询sbrq介于2009.10.01和2009.10.31之间的数据

access:
select * from gx_log where sbrq>=#2009-10-01# and sbrq<=#2009-10-31#

sqlserver:
select * from gx_log where sbrq between '2009-10-01' and '2009-10-31'

oracle:
select * from gx_log where sbrq between to_data('2009-10-01') and to_data('2009-10-31')

原创粉丝点击