日期:2014-05-17  浏览次数:21056 次

ORA-00933: SQL 命令未正确结束
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
   set c.scph =
       (select a.scph+1
          from cnycb a
         where a.scrq = (select max(scrq) from cnycb b where b.wjph = '123')) 
这样是更新cnycb的所有列为一个值,尼克想清楚了