function returnes int
delimiter $$ CREATE FUNCTION half(a INT) RETURNS INT BEGIN RETURN a/2; END$$ delimiter ;