Ayuda SQL
Publicado por infer (1 intervención) el 21/05/2019 11:29:14
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
DECLARE
v_entrar NUMBER :=4;
v_last EMPLOYEES.LAST_NAME%TYPE;
v_dep EMPLOYEES.department_id%TYPE;
cursor cursor1 is
select last_name, DEPARTMENT_ID from employees;
BEGIN
open cursor1;
fetch CURSOR1 into v_last, v_dep;
while cursor1%rowcount <= v_entrar and cursor1%found loop
dbms_output.put_line ('empleat :' || v_last || ' department :' || v_dep);
fetch CURSOR1 into v_last, v_dep;
end loop;
close cursor1;
end;
Valora esta pregunta


0