문제

I want to update table sheet and set column value of hproject to 'yes' where customer having hproject='yes'

UPDATE `sheet` SET `hproject` =  'yes' WHERE (
SELECT `customer`
FROM `sheet`
WHERE `hproject` =  'yes'
)

Above query is not working, i'll be grateful for any help or guidance.

Regards

도움이 되었습니까?

해결책

try that :

  UPDATE `sheet` SET `hproject` =  'yes' WHERE `customer` in (
  select * from(
  SELECT `customer`
  FROM `sheet`
  WHERE `hproject` =  'yes'
 )t
 )
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top