我在oracle 下写了个存储过程wwtest,编译正常,我前台用的是plsqldeveloper,打开一个运行命令的window: 执行:exec wwtest,却提示“提示无效的sql语句”,为什么啊?!!!

解决方案 »

  1.   

    存储过程拿出来看看编译正确不一定代表能够执行  只是说没有语法错误罢了要看存储过程才可以并且plsqldeveloper这个里面有执行的按纽  而且还可以跟踪 为什么不用一下那???
      

  2.   

    sql windows ??
    begin
    wwtest;
    end;
    command windows??
    exec wwtest
      

  3.   

    create or replace procedure wwtest(
    p_Res out Integer 

    Is 
    Cursor mycursor(c_id atest.id%Type) Is 
    Select Name, age From atest Where id=c_id; 
    Begin 
    Delete From atest where id=4; 
    Insert Into atest(Name, age) Values('v_name', 12); 
    Insert Into atest(Name, age) Values('a', 12); 
    Insert Into atest(Name, age) Values('b', 43); 
    Commit; 
    Open mycursor(4); 
    p_Res := 1; Exception 
    When no_data_found Then 
    dbms_output.put_line('no data found'); 
    p_Res := -1; end wwtest; 
    这就是那个存储过程,语法提示没有错误
      

  4.   

    是不是在sql windows里面执行了exec??
      

  5.   

    打开一个 command windows 执行 exec wwtest
      

  6.   

    打开一个 command windows 执行 exec wwtest
    提示:exec不是内部或外部命令,也不是可运行的程序或批处理文件
      

  7.   

    我说的command window 指的是plsqldeveloper中的 点击一个文件的图标可以出现 sql window
    ,command window的选项 选择command window打开一个新窗口,或者你在sql/plus中直接打exec wwtest
      

  8.   

    不是,是这样:  打开一个 command windows 执行 exec wwtest后,没提示错误,但是也没变化
      

  9.   

    var  g   number;回车
    exec wwtest(:g); 回车