您的位置:首页 > 数据库

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

2009-12-07 10:02 435 查看
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')
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: