我想更新表sheet
并将hproject
的列值设置为'是'其中customer
hproject
='是'
UPDATE `sheet` SET `hproject` = 'yes' WHERE (
SELECT `customer`
FROM `sheet`
WHERE `hproject` = 'yes'
)
以上查询无效,我将不胜感激任何帮助或指导。
此致
答案 0 :(得分:2)
试试:
UPDATE `sheet` SET `hproject` = 'yes' WHERE `customer` in (
select * from(
SELECT `customer`
FROM `sheet`
WHERE `hproject` = 'yes'
)t
)