Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or replace
- function pokaz_klientow(pierwszy int)
- return zbior_klientow as
- k klient;
- wynik zbior_klientow;
- i int;
- cursor c is select * from klienci
- where id_kl >= pierwszy order by id_kl;
- begin
- i := 5;
- wynik := zbior_klientow();
- k := klient(null,null,null);
- for dane_klienta in c
- loop
- if i <= 0 then exit; end if;
- wynik.extend;
- k.id_kl := dane_klienta.id_kl; k.nazwa_kl:=dane_klienta.nazwa_kl; k.adres:=dane_klienta.adres;
- wynik(wynik.count) := k;
- i := i-1;
- end loop;
- return wynik;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement