当前位置: 代码迷 >> Oracle开发 >> ORA-00933: SQL 命令未正确结束,该如何解决
  详细解决方案

ORA-00933: SQL 命令未正确结束,该如何解决

热度:141   发布时间:2016-04-24 06:44:49.0
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的所有列为一个值,尼克想清楚了