代码改变世界

SQL 时间段查询,计算时间范围

2009-07-10 16:04  liyao_2009  阅读(860)  评论(0)    收藏  举报

SQL Server

select * from book where 查询时间 between '"+时间格式(起始时间)+"' and '"+时间格式(终止时间)+"'

Access

select * from book where 查询时间 between #"+时间格式(起始时间)+"# and #"+时间格式(终止时间)+"#