gpt4 book ai didi

mysql - "..."中的未知列 "where clause"

转载 作者:行者123 更新时间:2023-11-29 17:41:45 25 4
gpt4 key购买 nike

我在执行特定任务时遇到此问题:

SELECT radnik.*, nalog.prioritetNalog FROM radnik
INNER JOIN nalog ON radnik.sifRadnik=nalog.sifRadnik
WHERE kvar.nazivKvar ="Zamjena klipa";

结果:

Error Code: 1054
Unknown column 'kvar.nazivKvar' in 'where clause'

它是这么说的,但是列和数据表存在

/image/mQZt4.jpg

最佳答案

您需要额外的JOIN:

SELECT r.*, n.prioritetNalog
FROM radnik r INNER JOIN
nalog n
ON r.sifRadnik = n.sifRadnik INNER JOIN
kvar k
ON k.sifkvar = n.sifkvar
WHERE k.nazivKvar = 'Zamjena klipa';

您只能在查询中引用 FROM 子句中定义的列。

关于mysql - "..."中的未知列 "where clause",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49968888/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com