关于oracle存储过程的若干问题备忘

VCount number(8not null,
bid 
varchar2(50not null -- 外键 
);
如果在存储过程中,使用如下语句:
select sum(VCount) into fcount from A where bid='xxxxxx';
如果A表中不存在bid="xxxxxx"的记录,则fcount=null(即使fcount定义时设置了默认值,如:fcount number(8):=0依然无效,fcount还是会变成null),这样以后使用fcount时就可能有问题,所以在这里最好先判断一下:
if fcount is null then
    fcount:
=0;
end 
if;
这样就一切ok了。
6.Hibernate调用oracle存储过程
        this.pnumberManager.getHibernateTemplate().execute(
                
new HibernateCallback() {
共4页 首页 上一页 [1] [2] [3] [4下一页 尾页>
字母检索 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z