mysql 查询错误 - where 内的内部联接
我收到此错误:
for the right syntax to use near 'INNER JOIN oferta B ON A.oferta_id_oferta = B.id_oferta AND B.oferta = "design' at line 4
我无法在 where 子句中进行内部联接?或者此查询存在其他问题?
UPDATE `oferta_has_tags` A
SET fraccao = "1/7"
WHERE (
INNER JOIN oferta B
ON A.oferta_id_oferta = B.id_oferta
AND B.oferta = "designer"
AND B.estado = 0)
i got this error:
for the right syntax to use near 'INNER JOIN oferta B ON A.oferta_id_oferta = B.id_oferta AND B.oferta = "design' at line 4
i can't make a inner join inside a where clause ? or exists other problem with this query ?
UPDATE `oferta_has_tags` A
SET fraccao = "1/7"
WHERE (
INNER JOIN oferta B
ON A.oferta_id_oferta = B.id_oferta
AND B.oferta = "designer"
AND B.estado = 0)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
将其表达为简单的
IN
:此外,将双引号 (
"
) 更改为单引号 ('
) - 使用双引号会导致错误Express it as a simple
IN
:Also, changed double quotes (
"
) to single quotes ('
) - using double quotes will cause an error查询错误。它必须有 SELECT 和 FROM 子句:
它必须是这样的:
确保子查询应恰好返回 1 个值。如果要使用上述查询更新多条记录,请将“=”替换为“IN”。像这样:
希望它有帮助...
The query is wrong. It must have SELECT and FROM clauses:
It must be something like this:
Make sure that the subquery should return exactly 1 value. If you want to update multiple records using above query, replace "=" with "IN". Like this:
Hope it helps...