Advertisement
Guest User

Untitled

a guest
May 21st, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. create or replace
  2. function pokaz_klientow(pierwszy int)
  3. return zbior_klientow as
  4. k klient;
  5. wynik zbior_klientow;
  6. i int;
  7. cursor c is select * from klienci
  8. where id_kl >= pierwszy order by id_kl;
  9. begin
  10. i := 5;
  11. wynik := zbior_klientow();
  12. k := klient(null,null,null);
  13. for dane_klienta in c
  14. loop
  15. if i <= 0 then exit; end if;
  16. wynik.extend;
  17. k.id_kl := dane_klienta.id_kl; k.nazwa_kl:=dane_klienta.nazwa_kl; k.adres:=dane_klienta.adres;
  18. wynik(wynik.count) := k;
  19. i := i-1;
  20. end loop;
  21. return wynik;
  22. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement