create or replace procedure Verification(ANN VEHICULE.ANNEE%type) AS cursor cr is select v.ANNEE, V.NUMVEHICULE, i.DATEDEBINTERV, i.DATEFININTERV from VEHICULE v, INTERVENTIONS i where v.ANNEE = ANN AND i.NUMVEHICULE = v.NUMVEHICULE; c cr%rowtype; vide EXCEPTION; BEGIN FOR c in cr loop if (c.DATEDEBINTERV <= c.DATEFININTERV) then DBMS_OUTPUT.PUT_LINE(' vérification positive pour le vehicule'||c.NUMVEHICULE); else DBMS_OUTPUT.PUT_LINE(' vérification negative pour le vehicule'||c.NUMVEHICULE); end if; end loop; EXCEPTION when vide then dbms_output.put_line('Aucun vehicule trouvé'); END; / EXECUTE Verification(1998);