对于select的in嵌套子查询[DQL]:
select en_name from goods where uid in(
select uid from goods where goods_type_uid = '612ae65210a24ad88fc2faa6bd87c876'
)
而对于update等[DML]语句:
需要对子查询做一层临时表的包裹
UPDATE goods
SET en_name = REPLACE (en_name, 'brand ', '')
WHERE
uid IN (
SELECT
uid
FROM
(
SELECT
uid
FROM
goods
WHERE
goods_type_uid = '612ae65210a24ad88fc2faa6bd87c876'
AND en_name LIKE '%brand %'
) t
)