This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center
                            
                        
                    
                
                                7年前关闭。
            
                    
大家在我的SQL查询中收到此语法错误:


  '#1064-您的SQL语法有误;检查与您的MySQL服务器版本相对应的手册,以获取正确语法的语法,以在'A(状态)值(“ NOK”)附近使用INNER JOIN lm_Schwellwert S ON A.Typ = S.Typ WHERE A.B'


这是我的查询:

INSERT INTO lm_Artikel A INNER JOIN lm_Schwellwert S
ON A.Typ = S.Typ (Status) VALUES ("NOK") WHERE A.Bestand < S.Schwellwert


您能帮我找到错误吗,我不知道怎么了。

最佳答案

我认为您正在尝试这样做:

INSERT INTO lm_Artikel (Status)
SELECT 'NOK'
FROM lm_Artikel A
INNER JOIN lm_Schwellwert S ON A.Typ = S.Typ
WHERE A.Bestand < S.Schwellwert

关于mysql - sql查询给出语法错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13524847/

10-15 16:20