Documentos de Académico
Documentos de Profesional
Documentos de Cultura
1. Editar p2e05.sql.
a. Usar un comentario de fila simple sobre la línea que crea la variable bind.
c. Declarar dos variables: fname de tipo VARCHAR2 y tamaño 15, y emp_sal de tipo
NUMBER y tamaño 10.
-- com --
variable p_pf NUMBER;
DECLARE
v_Today DATE : = SYSDATE;
v_Tomorrow v_Today%TYPE;
v_msj VARCHAR2 (30) := 'hello' ;
fname VARCHAR2 (15);
emp_sal NUMBER (10);
v_Salariobasico NUMBER;
BEGIN
/* basic_percent :=45;
pf_percent := 12; */
-- v_Tomorrow := v_Today+1;
--DBMS_OUTPUT.PUT_LINE('Today: '|| v_Today);
--DBMS_OUTPUT.PUT_LINE('Tomorrow: ' ||v_Tomorrow);
--DBMS_OUTPUT.PUT_LINE(v_msj || fname);
select first_name, salary
into fname, emp_sal from employees
where employee_id = 110;
v_salariobasico := ((emp_sal *45)/100);
:p_pf := ((v_salariobasico*12)/100);
DBMS_OUTPUT.PUT_LINE(v_msj || fname);
DBMS_OUTPUT.PUT_LINE('Impuesto total PF: '|| :p_pf);
end;