注  --pack.get_parm  取得参数 
pack.set_parm(pack.get_parm) = pack.get_parm  设置参数  这个是肯定是对的 我写了两个视图 create or replace view v_A   as    select id from aa where cid = pack.get_parm   ; create or replace view v_B 
  as    select id from bb where id in 
          ( select id from v_a where pack.set_parm(pack.get_parm) = pack.get_parm ) ; 
  在PL/SQL中执行 select from  v_B where  pack.set_parm(100) =100  --查出空 
  这时我先执行   select from  v_A where  pack.set_parm(100) =100  --查出有数据   再执行   select from  v_B where  pack.set_parm(100) =100  --有数据   不知道还要在哪里设置一下才能达到第一次查询  select from  v_A where  pack.set_parm(100) =100   就有数据 

解决方案 »

  1.   

    你那个get在等号左右都出现了,不知道你为什么这么设计。搞得很复杂。
      

  2.   

    TO hdhai9451  不想合并..因为A视图 还要被很多其它视图调用
    TO wangxuhero    pack.set_parm(100) =100   好像就只有这种方式可以传参...其它方式没有找到..望指教...