【发布时间】:2025-12-09 11:40:01
【问题描述】:
您好,我想在functie.code = 中添加另一个数字,以便我得到 functie.code = 3 4 和 5 的人的结果。
但是我该怎么做呢?
SELECT distinct voornaam,achternaam,provincie,functie.naam,max(provincie)
FROM medewerker,functie,persoon,adres
WHERE medewerker.Functie_Code = functie.Code
AND medewerker.Persoon_idPersoon = persoon.idPersoon
AND persoon.Adres_idAdres = adres.idAdres
AND functie.code IN ( 3, 4, 5)
提前致谢
【问题讨论】:
-
你可能想要
where functie.code IN ( 3, 4, 5)。 -
嗨@jarlh。如果我这样做,我会得到一个 sql 语法错误
-
在您的具体情况下,将
functie.code = 3替换为functie.code IN ( 3, 4, 5)。 -
嗨@jarlh 谢谢你的帮助
-
欢迎来到 Stack Overflow!你的文字图片isn't very helpful。它无法大声朗读或复制到编辑器中,并且索引不是很好,这意味着有相同问题的其他用户不太可能在这里找到答案。请edit您的帖子直接合并相关文本(最好使用复制+粘贴以避免转录错误)。