大牛们都是用什么写sql代码的,感觉sqlplus太死了,写错后改动不方便,于是下了个sql hander,但是原来写的过程和函数等代码却运行出很多错了,不知道是为什么,sqlplus下是完全可行的!
例如:
create or replace procedure protest1
is 
begin
loop
 dbms_output.put_line('hello1:-)');
 dbms_output.put_line('hello2:-)');
 dbms_output.put_line('hello3:-)');
exit;
end loop;
END;
/
却显示
15:51:32 SQL>   dbms_output.put_line('hello2:-)')
ORA-00900: 无效 SQL 语句这么简单都不能通过!!!还有写执行过程sqlcode1:
@d:\sqlcode.sql
execute sqlcode1
显示找不到文件!!
哎,救急,先谢谢大伙,每次发帖求救都能得到解决,好人一生平安,新年快乐!!oraclesql编程工具

解决方案 »

  1.   

    我比较习惯pl/sql developer
    你的代码我执行没问题啊,不知你....?
    idle> create or replace procedure protest1
    is 
    begin
    loop
     dbms_output.put_line('hello1:-)');
     dbms_output.put_line('hello2:-)');
     dbms_output.put_line('hello3:-)');
    exit;
    end loop;
    END;
      2    3    4    5    6    7    8    9   10   11  
     12  /Procedure created.
    另外,单独执行存储过程需要exec 或者一个匿名块
    idle> exec dbms_output.put_line('hello2:-)');PL/SQL procedure successfully completed.