现在的位置: 首页 > 综合 > 正文

验证会议室在某一时间段内是否被占用SQL

2012年11月23日 ⁄ 综合 ⁄ 共 208字 ⁄ 字号 评论关闭
Select * From HuiYi
where
(时间字段1 Between BeginDate(时间参数1) and EndDate(时间参数2))
or (时间字段2 Between BeginDate(时间参数1) and EndDate(时间参数2))
or (时间参数1 Between 时间字段1 and 时间字段2)
or (时间参数2 Between 时间字段1 and 时间字段2)

说明:时间字段1、2是数据表字段名;时间参数1、2是选择的时间段。

抱歉!评论已关闭.