我是在PLSQL的command window里使用的命令
建表
drop table students;
create table students(ID int,userName varchar(100),userpass varchar(100),userAge int);insert into students values(1,'Jack','jjjaa',23);
insert into students values(2,'rose','jjjaa',21);
insert into students values(3,'lucy','jjjaa',22);
insert into students values(4,'Tony','jjjaa',24);
commit;
创建储存过程
create or replace procedure gogogo(uName in varchar, Age in int) is
begin
update students set UserAge = UserAge + Age where userName = uName;
commit;
end gogogo;
/
调用储存过程
exec SP_UPDATE_AGE('jack',1);