1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| declare
a number;
c number;
comp number;
compp number;
bilel metalevel.met_met_nom2%TYPE;
cursor c1 is
select met_met_nom2 from metalevel where nom='HC'
INTERSECT
select met_met_nom2 from metalevel where nom='HC2';
ligne_C2 c1%ROWTYPE;
begin
select count(*) into compp from metalevel where nom='HC';
select count(*) into comp from metalevel where nom='HC2';
open c1;
loop
FETCH c1 into ligne_c2;
EXIT WHEN c1%NOTFOUND;
bilel :=ligne_C2.met_met_nom2;
dbms_output.put_line(''||bilel);
END LOOP;
CLOSE C1;
COMMIT;
if (compp>comp) then
a:=comp;
dbms_output.put_line('le min est' ||a);
c:=(a/5);
dbms_output.put_line('divisiont' ||c);
else
a:=compp;
c:=(a/4);
dbms_output.put_line('le min est' ||c);
dbms_output.put_line('le min est' ||a);
end if;
END ; |