function returnes int : Function Returning « Procedure Function « SQL / MySQL






function returnes int

       

delimiter $$

CREATE FUNCTION half(a INT) RETURNS INT
BEGIN
   RETURN a/2;
END$$

delimiter ;

   
    
    
    
    
    
    
  








Related examples in the same category

1.Return value from a function
2.Return integer value from a function
3.Return NUMERIC(8,2) from a function
4.Check function parameter and return value
5.Using the returning value from a user-defined function in order by clause
6.Returning Decimal from the function