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
|
(champ IN VARCHAR2 DEFAULT NULL)
as
cursor c_Recherche is select nom_per from Table_Personne;
nbpers NUMBER(3);
aucun_personne EXCEPTION;
c1 c_Recherche%rowtype;
begin
--compte les personnes
select COUNT(*) into nbpers from Table_Personne;
--si pas de personne, exception
if nbpers = 0 then
RAISE aucun_personne;
end if;
--Acces sequentiel a la table Table_Personne
for c1 in c_Recherche loop
htp.prn('NOM :'||c1.nom_per ||'</br>'
);
end loop;
exception
when aucun_personne then
htp.prn('ya pas d'enregistrement'
);
end; |
Partager