merge into A a using B b
on(a.id_no = b.id_no)
when matched then update set a.sm_code=b.sm_code;
这句话报错 说缺少关键字???怎么修改阿
on(a.id_no = b.id_no)
when matched then update set a.sm_code=b.sm_code;
这句话报错 说缺少关键字???怎么修改阿
解决方案 »
- 安装好数据库后,默认的数据库账户打不开
- 取出表内所有数据并给出复合条件的具有相同ID的总
- occi linux编译环境的问题
- ORA-01756插入中文时报这个错误
- sqlserver存储过程谁能帮忙改为oracle新手求教
- 创建新的ORACLE数据库时,进行到39%的ORACLE JVM的时候报错
- 如何将interbase的数据移到oracle中,两个库的结构相同
- 这个SQL怎么写?
- 小问题。。。
- 请问:我写了一个包,然后spl/plus中定义一句DECLARE RetVal pkg_test.myrctype;执行后提示:未定义赋值变量,我如何测试写的包?谢谢(在线等
- function中的参数不能用到in中
- 关于java面试的回答
merge into A a using B b
on(a.id_no = b.id_no)
when matched then update set a.sm_code=b.sm_code; 语法没有错误,请问你的数据库版本是否为10g以及以上呢?
merge into 是9i里引入的
要是没有的话怎么执行这种功能 哈 ????
(select 1 from B c where a.id_no = c.id_no );
想当初我就是通过merge into 认识shiyiwan的,嘿嘿
set a.sm_code= (select sm_code from B b where a.id_no=b.id_no);
改成这样功能是一样的吗 ????
update A a
set a.sm_code= (select sm_code from B b where a.id_no=b.id_no)
where exists(select 1 from b where id_no=a.id_no);
where a.id_no in (select id_no from b )
否则不满足条件的数据也被更新为null