set serveroutput on ; DECLARE cursor cr is SELECT marque , COUNT(*) AS nbr FROM MARQUE MA, MODELE MO WHERE MA.NUMMARQUE = MO.NUMMARQUE GROUP BY MA.MARQUE ; c cr%rowtype; vide exception; BEGIN for c in cr LOOP dbms_output.put_line('La marque : '|| c.marque || ' posséde ' || c.nbr || ' modeles .' ); exit when cr%notfound; END LOOP; EXCEPTION WHEN vide THEN dbms_output.put_line('Aucune marque n est trouvé ! '); END; /