练习代码如下
create or replace PROCEDURE prodemo(param1 in VARCHAR2)
as
ageTemp "student".age%type;
begin
select age into ageTemp from "student" where id=param1;
update "student" set age=age+1 where id=param1;
dbms_output.put_line('去年的年龄是:' ||ageTemp|| ',今年的年龄是:' ||(ageTemp+1));
end;
表名为什么要用双引号括起来?
既然括起来,表名就必须大写 STUDENT
表的双引号去掉试试?