我是个新手   想创建个无参数的   为什么结束不了  
 create or replace procedure cview
 begin
 select nvl(a.n1,b.n1) as n1,nvl(a.n2,b.n2) as n2,n3,n4 from  a full join b
.n1=b.n1 and a.n2=b.n2;
 end;
 ;
 end; 
还有能不能告诉我  存储过程是怎么用的    创建完事的话  怎么调用 之类的  

解决方案 »

  1.   

    create or replace procedure cview
       (po_result    out      sys_refcursor)
    is
    begin
       open po_result for
          select nvl(a.n1,b.n1) as n1,nvl(a.n2,b.n2) as n2,n3,n4 from  a full join b 
          .n1=b.n1 and a.n2=b.n2; 
    end; 你返回的是一个结果集。至于调用,要看你用什么调用它。
    在其他子程序里,直接这样写:
    procedure cview;
      

  2.   

    哦  declar 是什么东西  书店比较小我目前没买到书  所以基础的东西都不知道   
    请教啦
      

  3.   

    买本PL/SQL方面的书看看,数据库编程比JAVA啊什么的,要简单,呵呵。
      

  4.   

    为什么没反应呢 
    SQL> create or replace procedure cview (po_result    out      sys_refcursor)
      2  is
      3  begin
      4  open po_result for
      5  select nvl(a.n1,b.n1) as n1,nvl(a.n2,b.n2) as n2,n3,n4 from  a full join b
    on a.n1=b.n1 and a.n2=b.n2;
      6  end;
      7
      8
      9
     10  ;
     11
      

  5.   

    create or replace procedure cview 
      (po_result    out      sys_refcursor) 
    is 
    begin 
      open po_result for 
          select nvl(a.n1,b.n1) as n1,nvl(a.n2,b.n2) as n2,n3,n4 from  a full join b 
          .n1=b.n1 and a.n2=b.n2; 
    end;
    /
    最后来个/