在oracle中,怎么将一个OR作为一个and条件?where pc.status = 2 and startDate between pc.projectStartDate and pc.projectEndDate or endDate between pc.projectStartDate and pc.projectEndDate其实这个startDate和endDate的判断的这个or的
来源:学生作业帮助网 编辑:作业帮 时间:2024/06/17 06:45:46
![在oracle中,怎么将一个OR作为一个and条件?where pc.status = 2 and startDate between pc.projectStartDate and pc.projectEndDate or endDate between pc.projectStartDate and pc.projectEndDate其实这个startDate和endDate的判断的这个or的](/uploads/image/z/15170174-62-4.jpg?t=%E5%9C%A8oracle%E4%B8%AD%2C%E6%80%8E%E4%B9%88%E5%B0%86%E4%B8%80%E4%B8%AAOR%E4%BD%9C%E4%B8%BA%E4%B8%80%E4%B8%AAand%E6%9D%A1%E4%BB%B6%3Fwhere+pc.status+%3D+2+and+startDate+between+pc.projectStartDate+and+pc.projectEndDate+or+endDate+between+pc.projectStartDate+and+pc.projectEndDate%E5%85%B6%E5%AE%9E%E8%BF%99%E4%B8%AAstartDate%E5%92%8CendDate%E7%9A%84%E5%88%A4%E6%96%AD%E7%9A%84%E8%BF%99%E4%B8%AAor%E7%9A%84)
在oracle中,怎么将一个OR作为一个and条件?where pc.status = 2 and startDate between pc.projectStartDate and pc.projectEndDate or endDate between pc.projectStartDate and pc.projectEndDate其实这个startDate和endDate的判断的这个or的
在oracle中,怎么将一个OR作为一个and条件?
where pc.status = 2 and startDate between pc.projectStartDate and pc.projectEndDate or endDate between pc.projectStartDate and pc.projectEndDate
其实这个startDate和endDate的判断的这个or的结果是前面where整个条件中的一个and条件.请问这个该怎么写?
在oracle中,怎么将一个OR作为一个and条件?where pc.status = 2 and startDate between pc.projectStartDate and pc.projectEndDate or endDate between pc.projectStartDate and pc.projectEndDate其实这个startDate和endDate的判断的这个or的
where pc.status != 2 and (startDate between pc.projectStartDate and pc.projectEndDate or endDate between pc.projectStartDate and pc.projectEndDate)
-----------------------------这样也可以------------------------------------------------------
where pc.status != 2 and (( startDate between pc.projectStartDate and pc.projectEndDate) or (endDate between pc.projectStartDate and pc.projectEndDate))
--------------------------------
这个问题的分类应该是数据库软件编程的.