[英]#1064 Syntax Error : In “Update Query”
當我使用這個mysql代碼
update catalog_product_entity_decimal
set value = "6.0000"
where attribute_id = 75 and
entity_in ( SELECT
product_id
from `catalog_category_product`
WHERE category_id =37 );
我收到這個錯誤
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SELECT product_id from `catalog_category_product` ' at line 4
我不知道我的查詢出了什么問題。 有人可以告訴我怎么了嗎?
謝謝
您在entity_in之后缺少IN子句。 用這個:
update catalog_product_entity_decimal
set value = "6.0000"
where attribute_id = 75 and
entity_id IN ( SELECT
product_id
from `catalog_category_product`
WHERE category_id =37 );
我認為catalog_category_product將不包含'符號。 不使用'符號嘗試查詢
你錯過了=
OR in
查詢
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.