-------------------------------------------------------------------------------
-- ex_pl_packages.sql 
-------------------------------------------------------------------------------
-- packages

create or replace package vacances as
procedure affiche;
end;
/

create or replace package body vacances as

procedure affiche is
  cursor c is
    select nom, age, jour
    from client, voyage
    where age < 25
      and client.idc = voyage.idc;
begin
  for x in c loop
    dbms_output.put_line(x.nom||', '||x.age||' ans, part le jour '||x.jour);
  end loop;
end;

end;
/

set serveroutput on

execute vacances.affiche;

-------------------------------------------------------------------------------
