Rok 1

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

alter table radnik

add cena_po_satu Number(6);

update radnik set cena_po_satu=(plata/10);


-----------------------------------------

alter table ucesce


add zarada number(6);

update ucesce set zarada=(select cena_po_satu from radnik


where ucesce.idbr=radnik.idbr)*brsati;

------------------------------------
create or replace trigger proba2
before insert on ucesce
for each row
declare
local radnik.cena_po_satu%type;

begin
select cena_po_satu into local from radnik
where idbr=:new.idbr;
:new.zarada:=:new.brsati*local;

end;
-----------------------------------

You might also like