在数据库中查询一段时间内的数据,SQL语句怎么写

日期:2017-09-25 08:43:50 人气:1

在数据库中查询一段时间内的数据,SQL语句怎么写

select * from 表 where 日期字段>='开始日期' and 日期字段<='截止日期' and convert(char(8),日期字段,108)>='开始时间' and convert(char(8),日期字段,108)<='截止时间' 例如: select * from tb1 where dDate>='2010-11-05' and dDate<=
    A+
热门评论