TERSUS笔记员工信息516-Mysql查询(2个字段的时间段唯一性判断)
确认唯一时间段(时间段不重复不包含)
select * from 16jiage where (${3}=qiDate or qiDate<${3}) and (${2}=biangengDate or biangengDate>${2})
select * from 16jiage where ('2022-04-04'=qiDate or qiDate<'2022-04-04') and ('2022-04-02'=biangengDate or biangengDate>'2022-04-02')
select * from 16jiage where ('2022-04-06'=qiDate or qiDate<'2022-04-06') and ('2022-04-01'=biangengDate or biangengDate>'2022-04-01')
select * from 16jiage where ('2022-04-09'=qiDate or qiDate<'2022-04-09') and ('2022-04-06'=biangengDate or biangengDate>'2022-04-06')
select * from 16jiage where ('2022-04-11'=qiDate or qiDate<'2022-04-11') and ('2022-04-11'=biangengDate or biangengDate>'2022-04-11')
select * from 16jiage where 01KSid=${1}
and (${3}=qiDate or qiDate<${3}) and (${2}=biangengDate or biangengDate>${2})
and feiyongleibie=${4} and feiyongleibie=${4} and feiyongxiangmu=${5} and xiangxingchicun=${6} and 13GKidtixiang=${7}
and Zsheng=${8} and Zshi=${9} and Zxian=${10} and Xsheng=${11} and Xshi=${12} and Xxian=${13} and 13GKidhuanxiang=${14}