declare @stardate varchar(10),@enddate varchar(10)
select * from
(
select top 1 * from table where 开始日期 <= @stardate order by 开始日期 desc
union all
select top 1 * from table where 开始日期 <= @enddate order by 开始日期 desc
union all
select * from table table where 开始日期 between @stardate and @enddate
)A
order by A.開始時間