update cnycb c set c.scph=(select a.scph from cnycb a where a.scrq=(select max(scrq) from cnycb b where b.wjph='123'))+1;
我这个sql语句到底哪里出问题了
------解决方案--------------------
说句老实话,语句可能有点问题:
update cnycb c这样是更新cnycb的所有列为一个值,尼克想清楚了
set c.scph =
(select a.scph+1
from cnycb a
where a.scrq = (select max(scrq) from cnycb b where b.wjph = '123'))