首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

生手求解 ORA-00933: SQL 命令未正确结束

2012-10-23 
新手求解 ORA-00933: SQL 命令未正确结束是oracle 用 PL SQLtable1 yl1 yl3table2 dwdm如果 table1的yl3

新手求解 ORA-00933: SQL 命令未正确结束
是oracle 用 PL SQL

table1 yl1 yl3  
table2 dwdm
如果 table1的yl3 和table2 的 dwdm 相同, 则把table2 的 dwdm 更新为table1 的yl1

update table2 set b.dwdm = a.YL1 from table2 b,table1 a where b.dwdm=a.yl3

执行提示ORA-00933: SQL 命令未正确结束 不知道哪错了  
在线等 谢谢

[解决办法]

SQL code
1、用分号结束2、更严密的写法update table2 b set b.dwdm=(select a.yl1 from table1 a where b.dwdm=a.yl3) where exists (select yl3 from table1 a where b.dwdm=a.yl3);3、楼主的结帖率太低了。 

热点排行