hristocr

Untitled

Oct 15th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. CREATE FUNCTION ufn_calculate_future_value (sum DECIMAL(38,18),interest DECIMAL(38,18), years INT)
  2. RETURNS DECIMAL(38,18)
  3. BEGIN
  4. DECLARE result DECIMAL (38,18);
  5. SET result := sum * pow(1 + interest,years);
  6. RETURN result;
  7. END;
  8.  
  9. #SELECT ufn_calculate_future_value(1000, 0.1, 5);
Advertisement
Add Comment
Please, Sign In to add comment