我有以下更新查询;
UPDATE service
SET PathNameEn = (SELECT NameEn FROM service WHERE id = 430) + ' > '
我想添加另一个WHERE
条件
WHERE id BETWEEN 430 AND 435
我尝试过:
UPDATE service
SET PathNameEn = (SELECT NameEn FROM service
WHERE id = 430 AND id BETWEEN 430 AND 435) + ' > '
但这没用
答案 0 :(得分:4)
您要更新多行吗?
UPDATE service
SET PathNameEn = (SELECT NameEn + ' > ' FROM service WHERE id = 430)
WHERE id between 430 AND 435;