student(sID,sNAME,sCLASS);
result(sID,subMARKS);
实际上,在MS-ACCESS中,我正在尝试使用等联接进行此操作,但结果却不正确。我在写我的查询
SELECT stud.sID
, stud.sNAME
, stud.sCLASS
, result.sID
FROM student
, result
WHERE(SELECT MAX(subMARKS) FROM result)
它应该仅显示Ali记录,因为他的分数最高。但我得到的输出如下图所示。
sID sNAME sCLASS
1 Ali BSC
2 Ahmad FSC
3 Asgar ICS
4 Akram BSC
答案 0 :(得分:1)
SELECT T1.SID, T1.sname FROM student T1
LEFT JOIN resultT2 ON t1.sid=t2.sid
WHERE t2.submarks = (SELECT Max(submarks) FROM result);
答案 1 :(得分:-3)
似乎您没有在WHERE子句中放置条件:
我建议您通过以下查询尝试类似的操作:
boolean result = CollectionsUtils.containsAny(actualList, expectedList);