我有一个选择语句::
SELECT [Course ID], [Course name]
FROM Courses
WHERE [Course ID] NOT IN
(SELECT [Course ID] from student_courses sc
INNER JOIN Courses c ON sc.[course ID] = c.[course ID]
WHERE [student ID] = 1
AND (c.[course start time] not BETWEEN Courses.[course start time] AND Courses.[course end time]
OR c.[course end time] not BETWEEN Courses.[course start time] AND Courses.[course end time]))
它不断给出以下错误::
数据类型日期和时间在小于或等于运算符中不兼容....
不明确的列名称“课程 ID”
如何修复这些错误并实际比较数据类型的列time(7)
?