create or replace PROCEDURE procedure1(Param1 IN NUMBER) IS
    var_no1  zjm.no%type;  BEGIN
    select  no into var_no1 from zjm where no=Param1;
  exception when no_data_found then
    dbms_output.put_line('no found');
    
  END procedure1;
  
  execute procedure1(12); end;上面的程序报900错误
另外我的toad  output里怎么不显示结果啊,只有状态栏显示sucessfully另外我写包,我怎么测试包里单独的过程或者函数啊,有没有好的方法呢???谢大家了。

解决方案 »

  1.   

      create or replace PROCEDURE procedure1(Param1 IN NUMBER) IS 
        var_no1  zjm.no%type;   BEGIN 
        select  no into var_no1 from zjm where no=Param1; 
      exception when no_data_found then 
        dbms_output.put_line('no found'); 
        
      END procedure1; 
      
      execute procedure1(12); end;红色去掉,在过程中调用过程/函数,直接写就可以了。 一直用PL/SQL。关于TOAD的东东,就不妄加猜测了
      

  2.   

      create or replace PROCEDURE procedure1(Param1 IN NUMBER) IS
        var_no1  zjm.no%type;  BEGIN
        select  no into var_no1 from zjm where no=Param1;
      exception when no_data_found then
        dbms_output.put_line('no found');
        
      END procedure1;
      
     begin procedure1(12); end;
    我把这贴到sql plus 里 怎么会报Warning: Procedure created with compilation errors.