我正在尝试在 oracle 中重写以下查询我使用 sql server 编写它
--check if there is no exam at the same time
IF EXISTS (
SELECT DISTINCT 'TRUE'
FROM FinalExams
WHERE ClassID = @pClassID
AND SectionID = @pSectionID
AND ExamDate = @pExamDate
AND @pStartHoure BETWEEN DATEADD(minute, - 1, StartHoure)
AND DATEADD(minute, - 1, FinishHoure)
AND @pFinishHoure NOT BETWEEN DATEADD(minute, - 1, StartHoure)
AND DATEADD(minute, - 1, FinishHoure)
OR StartHoure > @pStartHoure
AND FinishHoure < @pFinishHoure
)
有人可以帮忙吗?