-------------------------------------------------------------------------------
-- corr_pl_curseurs.sql 
-------------------------------------------------------------------------------
-- curseurs 

set serveroutput on

create or replace 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;
/

select * from client;
select * from voyage;

execute affiche;

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