我收到一个错误:
ERROR 1093 (HY000): You can't specify target table 'postac' for update in FROM clause查询时:
UPDATE postac
SET statek= (
SELECT statek
FROM postac
WHERE nazwa='Bjorn')
WHERE nazwa='*a*';有人能解决这个问题吗?
发布于 2016-04-14 18:39:58
试着这样做:
update postac p1
inner join postac p2 on p1.id = p2.id and p2.nazwa='Bjorn'
set p1.statek = p2.statek
where p1.nazwa='*a*'https://stackoverflow.com/questions/36620530
复制相似问题