Advertisement
Guest User

1B

a guest
Jan 27th, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. declare
  2. 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;
  3. nazwa ksiazki.tytul%type;
  4. czas number;
  5. begin
  6. open kursor;
  7. loop
  8. fetch kursor into nazwa, czas;
  9. exit when kursor%notfound;
  10. dbms_output.put_line(nazwa || ' ' || czas);
  11. end loop;
  12. close kursor;
  13. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement