[Err] 1093 - You can't specify target table 'good' for update in FROM clause


update good set goods_price=((select goods_price from good where good_id=4)+100) WHERE good_id=4;

mysql 上写这句话报: [Err] 1093 - You can't specify target table 'good' for update in FROM clause

如何修改mysql语句

向日葵一族
浏览 2441回答 2
2回答

DaRKeViL

update good set goods_price=goods_price+100  WHERE good_id=4;这样可以不?

慕粉4075985

为什么要这样写?
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java
MySQL