创建一个存储过程,以员工号为参数,输出该员工的工资
create or replace procedure p_sxt1(v_empno in emp.empno%type, v_sal out emp.sal%type) is
begin
select sal into v_sal from emp where empno = v_empno;
end;
--(1)执行
declare
v_empno emp.empno%type := 7369;
v_sal emp.sal%type;
begin
p_sxt1(v_empno,v_sal);
dbms_output.put_line(v_empno || ' 员工的工资为:' || v_sal);
end;
为什么会报出现符号 "DECLARE"
出现符号 "end-of-life" (begin case declard end execption exit for goto if loop mod null pragma raise return)
create or replace procedure p_sxt1(v_empno in emp.empno%type, v_sal out emp.sal%type) is
begin
select sal into v_sal from emp where empno = v_empno;
end;
--(1)执行
declare
v_empno emp.empno%type := 7369;
v_sal emp.sal%type;
begin
p_sxt1(v_empno,v_sal);
dbms_output.put_line(v_empno || ' 员工的工资为:' || v_sal);
end;
为什么会报出现符号 "DECLARE"
出现符号 "end-of-life" (begin case declard end execption exit for goto if loop mod null pragma raise return)