|
楼主 |
发表于 2020-3-21 14:30:01
|
显示全部楼层
哦,应当这样才全面
declare @b datetime
set @b= '2017-01-01'
declare @e datetime
set @e= '2017-12-01'
Select * from 表 where
@b between StartDate and EndDate or @e between StartDate and EndDate or startdate>=@b and enddate<=@e |
|