SQL Server查询某一日期是否在某条记录的两个时间段之内

我用的是SQl Server,我现在有一个日期作为条件,需要查询它是否在两个日期字段之间的某条记录,该怎么写SQL语句呢?

 LocalProductionStart LocalProductionEnd
2021-11-25 14:03:01.000 2021-12-05 12:53:51.000
2021-11-02 21:03:40.000 2021-11-07 04:05:38.000
2021-12-29 20:23:03.000 2021-12-31 00:56:13.000
2021-11-07 04:06:55.000 2021-11-09 01:48:39.000
2021-10-27 17:41:32.000 2021-11-02 21:02:52.000
2021-12-31 00:57:39.000 2022-01-04 08:50:50.000
2022-01-04 08:51:27.000 2022-01-08 15:08:49.000
2021-10-03 17:24:20.000 2021-10-11 23:52:31.000

select xx xx from 表名 where LocalProductionStart < 你传参的值 and LocalProductionEnd > 你传的值;

select * from 表 where LocalProductionStart < 日期 and LocalProductionEnd > 日期
日期用你自己的日期字符串替换,记得要加单引号

你这个是拉链表吧,假设有个日期表test1(anc_date date)
做一个表关联就可以:
select * from table1 a join test1 b on b.anc_date between a.localproductionstart and a.localproductionend;

可能我的描述不清晰,我的条件只有一个日期值,例如2031/11/16 01:01:01,这个条件应该包含在第一条记录,我该怎么写SQL