You are on page 1of 2

create or replace procedure actualizare_mail(codigo in EMPLOYEES.EMPLOYEE_ID%type) is begin update EMPLOYEES set EMPLOYEES.EMAIL=(select EMPLOYEES.EMAIL from EMPLOYEES where EMPLOYEES.EMPLOYEE_ID=codigo)||'@unsch.edu.

pe' where EMPLOYEES.EMPLOYEE_ID=codigo; end; ara ejecutar el procedimiento begin ACTUALIZARE_MAIL(190); end; Ver select * from EMPLOYEES where EMPLOYEE_ID = 190

/*Crear un procedimiento almacenado que permita aumentar los salarios en un porcentaje indicado, segn la ocupacin que corresponda.*/ create or replace procedure aumentar_salario(ocupacion in EMPLOYEES.JOB_ID%type, porcentaje_aumento in EMPLOYEES.SALARY%type) as begin update EMPLOYEES set EMPLOYEES.SALARY=EMPLOYEES.SALARY*((porcentaje_aumento/100)+1); end;

execute AUMENTAR_SALARIO('SH_CLERK',10); select EMPLOYEE_ID, FIRST_NAME, JOB_ID, SALARY from EMPLOYEES

You might also like