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

hibernate3 调用oracle存储过程的方法

配置文件:
<hibernate-mapping>
    <class name="vo.SshPost" table="ssh_post" >
     <!-- <cache usage="read-write"/>-->
        <id name="postId" type="java.lang.String">
            <column name="post_id" />
            <generator class="native" />
        </id>
       
        <property name="postName" type="java.lang.String">
            <column name="post_name" length="20" />
        </property>
        <property name="postNo" type="java.lang.String">
            <column name="post_no" length="20" />
        </property>
        <filter name="myfilter" condition=":myfilterParam = post_name"/>
      
    </class>
<sql-query callable="true" name="selectAllUsers">
 <return class="vo.SshPost">
     <return-property name="postId" column="POST_ID"/>
     <return-property name="postName" column="POST_NAME"/>
     <return-property name="postNo" column="POST_NO"/>
 </return>
 { call P_TEST(?,:VPOSTNO) }
     </sql-query>
</hibernate-mapping>  
存储过程:
CREATE OR REPLACE PACKAGE TESTPACKAGE  AS
 TYPE Test_CURSOR IS REF CURSOR;
end TESTPACKAGE;
CREATE OR REPLACE PROCEDURE P_TEST(P_CURSOR OUT TESTPACKAGE.TEST_C


相关文档:

oracle 表信息

 因为项目某些模块的数据结构设计没有严格按照某规范设计,所以只能从数据库中查询数据结构,需要查询的信息如下:字段名称、数据类型、是否为空、默认值、主键、外键等等。
在网上搜索了查询上述信息的方法,总结如下:
一,查询表基本信息
select
    utc.column_name,utc.data_type,utc.data_le ......

ORACLE parent latch和children latch

         About parent vs child latches. There is no fundamental low level difference between parent and child latches, they are all small regions of memory modified with atomic test-and-set style opcodes.
You see parent (and solitary) latches from x$ksll ......

Oracle select in/exists/not in/not exits

in 是把外表和内表作hash 连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询。
一直以来认为exists比in效率高的说法是不准确的。
如果查询的两个表大小相当,那么用in和exists差别不大。
in 是把外表和内表作hash
连接,而exists是对外表作loop循环,每次loop循环再对内表进行查询。
一直以 ......

Oracle初学笔记(1)

 
安装Oracle后,更改Windows计算机名,导致部分Oracle第三方工具,如:PLSQL
Developer无法登陆,并提示ORA-12541:TNS:no listener或ORA-12547:TNS:丢失联系等错误信息的解决方法。
答:从Oracle的错误提示来看,是说TNS:no listener
,估计是某种服务没有启动,打开windows管理工具->服务,一看,有一个Oracle ......

转载oracle rollup和cube函数使用心得

 转自:http://blog.csdn.net/wangdongzjk/archive/2005/11/18/532424.aspx
事关CUBE ROLLUP GROUPING SETS(1)
原文引自:
聚合是数据仓库的基础。为了提高聚合的性能。Oracle提供了Group By 条款的扩展。
1. CUBE, ROLLUP扩展
2. 3个grouping函数
 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号