Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE FUNCTION ufn_calculate_future_value (sum DECIMAL(38,18),interest DECIMAL(38,18), years INT)
- RETURNS DECIMAL(38,18)
- BEGIN
- DECLARE result DECIMAL (38,18);
- SET result := sum * pow(1 + interest,years);
- RETURN result;
- END;
- #SELECT ufn_calculate_future_value(1000, 0.1, 5);
Advertisement
Add Comment
Please, Sign In to add comment