1、带参数的存储过程
CREATE
OR REPLACE PROCEDURE sp_pro2 (spname VARCHAR2, newsal NUMBER) IS
BEGIN
UPDATE
emp SET sal = newsal WHERE ename=spname;
END;
--参数VARCHAR2不需要指定大小
exec
sp_pro2(‘SMITH‘,10);
或者call
sp_pro2(‘SMITH‘,10);
2021-08-25 08:23:54
1、带参数的存储过程
CREATE
OR REPLACE PROCEDURE sp_pro2 (spname VARCHAR2, newsal NUMBER) IS
BEGIN
UPDATE
emp SET sal = newsal WHERE ename=spname;
END;
--参数VARCHAR2不需要指定大小
exec
sp_pro2(‘SMITH‘,10);
或者call
sp_pro2(‘SMITH‘,10);