问题描述:

This question already has an answer here:

  • How can I determine in SQL Server if a dateTime range overlaps another

    1 answer

网友答案:
SELECT
  *
FROM
  yourTable
WHERE
      to_date   >= @from_date_parameter
  AND from_date <= @to_date_parameter
网友答案:
SELECT ID FROM MyTable
WHERE FromDate<= '2012/02/03' AND ToDate>= '2012/01/25'

See this SQLFiddle

相关阅读:
Top