Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- declare
- cursor kursor is select tytul, max(data_zwrotu-data_wypozyczenia) as najdlusze from ksiazki natural join wypozyczenia where data_zwrotu is not null group by tytul;
- nazwa ksiazki.tytul%type;
- czas number;
- begin
- open kursor;
- loop
- fetch kursor into nazwa, czas;
- exit when kursor%notfound;
- dbms_output.put_line(nazwa || ' ' || czas);
- end loop;
- close kursor;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement