易截截图软件、单文件、免安装、纯绿色、仅160KB

oracle UPDATE 多表关联更新

update customers a
set city_name=(select b.city_name from tmp_cust_city b where b.customer_id=a.customer_id)
where exists (select 1
from tmp_cust_city b
where b.customer_id=a.customer_id
)
-- update 超过2个值
update customers a
set (city_name,customer_type)=(select b.city_name,b.customer_type
from tmp_cust_city b
where b.customer_id=a.customer_id)
where exists (select 1
from tmp_cust_city b
where b.customer_id=a.customer_id
)
========================
select * from path p,sd_mapnodes a
where p.aendnode=a.nm_node_id
update path p
set p.aendnode=(select s.ems_node_id from sd_mapnodes s where s.nm_node_id=p.aendnode)
where exists (select 1 from sd_mapnodes s where s.nm_node_id=p.aendnode)
select * from pathtrace pt,sd_mapnodes a
where pt.anode_id=a.nm_node_id
update pathtrace r
set (r.anode_id,r.znode_id)=(select s.ems_node_id,s.ems_node_id from sd_mapnodes s where s.nm_node_id=r.anode_id)
where exists (select 1 from sd_mapnodes s where s.nm_node_id=r.anode_id)


相关文档:

oracle中占位符

跟其他语言的参数差不多,使用时要把把真实数据传过去替代
优点记得一些,如果在查询中使用直接量(常量),那么每个查询都将是一个全新的查询,必须对查询进行解析、限定(命名解析)、安全性检查、优化等即重新生成执行计划。而使用了以后就可以重复使用最先创建的执行计划。 ......

对oracle数据库中的数据表进行备份


public ActionForward backUpAction(ActionMapping mapping, ActionForm form,   
            HttpServletRequest request, HttpServletResponse response)   
    &n ......

oracle 检查被锁的表及解锁

原文地址:http://tech.e800.com.cn/articles/2009/710/1247207067745_1.html
处理方法一 :

检查哪个表被锁
select sess.sid,sess.serial#,
lo.oracle_username,lo.os_user_name,ao.object_name,lo.locked_mode
from
v$locked_object lo,dba_objects ao,v$session sess
where ao.object_id =
lo.object_id
......

Oracle数据类型简介【转贴】

Oracle数据类型简介
  一、概述
  在ORACLE8中定义了:标量(SCALAR)、复合(COMPOSITE)、引用(REFERENCE)和LOB四种数据类型,下面详细介绍它们的特性。
  二、标量(SCALAR)
  合法的标量类型与数据库的列所使用的类型相同,此外它还有一些扩展。它又分为七个组:数字、字符、行、日期、行标识、布尔和可 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号