You are on page 1of 1

delimiter //

drop function tva_25_mare;


create function tva_25_mare(numar_factura int, tva int) returns double
BEGIN
select cota_tva into @tva_cota
from facturi where numar_factura=numar;
set @tva_final = round((@tva_cota*1.25),2);
return (@tva_final);
end;//

delimiter //
SELECT
numar, cota_tva as tva_vechi,
tva_25_mare(numar, cota_tva) as valoare_tva_marita
from facturi; //

You might also like