我在执行特定任务时遇到了这个问题:

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'


这样说,但列和数据表存在

https://i.stack.imgur.com/mQZt4.jpg

最佳答案

试试这个语法:

SELECT column1, column2....columnN
FROM   table_name1 t1, table_name2 t2
on t1.id = t2.id
WHERE  CONDITION;


范例:

SELECT radnik.*, nalog.prioritetNalog
FROM radni INNER JOIN nalog
ON radnik.sifRadnik=nalog.sifRadnik
WHERE table_name.column_name ="Zamjena klipa";

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

10-10 16:24