create or replace procedure salarys(egh in number)
as
--定义一个变量保存涨前薪水
sal emp.salary%type;
begin
--得到员工涨前的薪水
select salary into sal from emp where employee = egh;
exception
when no_data_found then
sal := 1;
--给该员工涨100
update emp set salary = salary+100 where employee = egh;
--打印
dbms_output.put_line('涨前:'||sal||'涨后:'||(sal+100));
end;
/
emp表的两个字段改名了嘛,而且in number 可以读取字符串吗
应为你在命令里面执行前没有打开屏幕输出开关, 写打开,再去执行存储过程, 打开的语句set serveroutput on