29 Jun
2023
29 Jun
'23
4:49 p.m.
This is something learning by doing. What about this function CREATE FUNCTION second_largest(x INT, y INT, z INT) RETURNS INT DETERMINISTIC RETURN x+y+z - LEAST(x, y, z) - GREATEST(x, y, z); See i believe in code clarity, although this seems using two function calls inside my function . may be expensive in terms of time, but is more clear .