Дополнен 4 года назад
Текст функции:
create or replace function zadanie4 (ciphr number)
return varchar is
ciphrrr postavki.postavki_ciph%type;
tovaar tovar.tovar_name%type;
catt categoria.categoria_name%type;
postt postavshic.postavshic_name%type;
kolvo postavki.postavki_kol%type;
begin
select distinct postavki_ciph, tovar_name, categoria_name, postavshic_name, postavki_kol
into ciphrrr, tovaar, catt, postt, kolvo
from tovar, categoria, postavshic, postavki
where postavki_ciph=ciphr and tovar_id=postavki_tov and categoria_id=postavki_cat and postavshic_id=postavki_post and postavki_kol is not null
group by postavki_ciph, tovar_name, categoria_name, postavshic_name, postavki_kol;
return ('Ciphr: '||ciphrrr||'. Nazvanie: '||tovaar||'. Categoria: ' || catt|| '. Postavshik: '||postt||'. Kolichestvo: ' ||kolvo);
end zadanie4;