select * from
table t2
where name = @name
and (@inserted_start_datetime between
start_datetime and end_datetime
or @inserted_end_datetime between
start_datetime and end_datetime
or start_datetime between
@inserted_start_datetime and
@inserted_end_datetime
or
end_datetime between @inserted_start_datetime and @inserted_end_datetime
No comments:
Post a Comment