create or replace procedure do_insättning( p_radnr in insättning.radnr%type, p_pnr in insättning.pnr%type, p_knr in insättning.knr%type, p_belopp in insättning.belopp%type, p_datum in insättning.datum%type) as begin insert into insättning(radnr,pnr,knr) values(select radnr from kontoägare,select pnr from bankkund, select knr from konto); insert into insättning(belopp,datum) values(p_belopp,p_datum); update konto set konto.saldo = konto.saldo - p_belopp where kontoägare.radnr = p_radnr; dbms_output.put_line('Saldo: '||''||saldo); end;
saldo
...set konto.saldo = konto.saldo - p_beloppwhere kontoägare.radnr = p_radnr; declare saldo number;saldo = (select kont.saldo from konto where kontoägare.radnr = p_radnr); dbms_output.put_line('Saldo: '||''||saldo);
update konto
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)