关于赋值,已改正。但还是给出“警告: 创建的过程带有编译错误。”信息。麻烦的是它不给出错误在哪。我试了试,把整个过程体拿掉: create procedure sam_first_pro (in_playerid string, in_sal real) is current_sal real; new_sal real; salary_missing EXCEPTION; begin end sam_first_pro; 它照样给出“警告: 创建的过程带有编译错误。”信息。请高手诊断。
show error 看错误在哪行
怎么用show error? 紧接着我上面写的过程后面用吗?好象不行啊。
而且能解释一下为什么空壳的存储过程它仍说有编译错呢?比如下面这个: create procedure sam_first_pro (in_playerid string, in_sal real) is begin end sam_first_pro;
至少要有个语句,如: create procedure sam_first_pro (in_playerid string, in_sal real) is begin null; end sam_first_pro;
create procedure sam_first_pro (in_playerid string, in_sal real) is begin null; end sam_first_pro; 仍然是:警告: 创建的过程带有编译错误。
SQL> create procedure sam_first_pro (in_playerid string, in_sal real) is 2 begin 3 null; 4 end sam_first_pro; 5 6 /过程已创建。我怎么没有啊??我是粘贴你的代码啊~
我在8.17上试过没什么问题,你把传入变量改成in_playerid varchar2, in_sal number 看看
我又试了试,把传入参数统统去掉,如下例,仍然得到:警告: 创建的过程带有编译错误。 create procedure sam_first_pro () is begin null; end sam_first_pro; 但存储过程究竟建没建起呢?因为我每次重新create前必须得用:drop procedure sam_first_pro;把它先删掉才能又建。疑问重重啊!
你可以create or replace procedure ... 建没建起来,desc 过程名,看看就知道了
create procedure sam_first_pro (in_playerid string, in_sal real) is
current_sal real;
new_sal real;
salary_missing EXCEPTION;
begin
end sam_first_pro;
它照样给出“警告: 创建的过程带有编译错误。”信息。请高手诊断。
看错误在哪行
create procedure sam_first_pro (in_playerid string, in_sal real) is
begin
end sam_first_pro;
create procedure sam_first_pro (in_playerid string, in_sal real) is
begin
null;
end sam_first_pro;
begin
null;
end sam_first_pro;
仍然是:警告: 创建的过程带有编译错误。
2 begin
3 null;
4 end sam_first_pro;
5
6 /过程已创建。我怎么没有啊??我是粘贴你的代码啊~
看看
create procedure sam_first_pro () is
begin
null;
end sam_first_pro;
但存储过程究竟建没建起呢?因为我每次重新create前必须得用:drop procedure sam_first_pro;把它先删掉才能又建。疑问重重啊!
建没建起来,desc 过程名,看看就知道了
begin
null;
end sam_first_pro;show err
即可查看错误信息每次重新create前必须得用:drop procedure 改成create or replace procedure ...
create or replace procedure sam_first_pro is
begin
null;
end sam_first_pro;
没有括号的
或
begin
过程名;
end;
/