标签:HERE where ons create procedure arc char int var
select elsif 选出员工工资根据类型加薪
create or replace procedure Proc_emp_salary is
c_manager constant number :=0.1;
c_salesman constant number :=0.3;
v_job varchar(100);
begin
select job into v_job
from emp where emp.empno=‘7566‘;
if v_job=‘SALEMAN‘
then
update emp t set t.sal=t.sal*(1+c_manager) where empno=‘7566‘;
elsif v_job =‘MANAGER‘
then
update emp t set t.sal=t.sal*(1+c_salesman) where empno=‘7566‘;
end if;
dbms_output.put_line(v_job);
exception
when no_data_found
then
dbms_output.put_line(‘没有找到数据‘);
end Proc_emp_salary;
标签:HERE where ons create procedure arc char int var
原文地址:https://www.cnblogs.com/shejiewei/p/9869901.html