日期:2014-05-17  浏览次数:20766 次

为什么我写的这个存储过程不能建立啊
create   or   replace   procedure   pd   (cname   in   varchar2(55))
is
age_     int
begin
select   age   into   age_   from   student   where   name=cname;
end;
/

  为什么编译老是通不过啊,

------解决方案--------------------
探讨
create or replace procedure pd (cname in varchar2(55))
is
age_ int
begin
select age into age_ from student where name=cname;
end;
/

为什么编译老是通不过啊,

------解决方案--------------------
创建表的代码:
SQL code

CREATE TABLE Student
(
    SID VARCHAR(20),
    Age INT,
    SName   VARCHAR(20)
);