DELIMITER $$
CREATE FUNCTION <function_name>(param1 VARCHAR(10),param2 CHAR(6) )
RETURNS VARCHAR(25) NON DETERMINISTIC
BEGIN
<function body>
//RETURN CONCAT('Hello, ',param1,' ',param2);
END $$;
DELIMITER
DELIMITER $$
CREATE FUNCTION getDetails(name VARCHAR(30), genderType CHAR(1) )
RETURNS VARCHAR(45) NON DETERMINISTIC
BEGIN
DECLARE gender VARCHAR(6) DEFAULT 'Female';
IF(genderType='M') THEN
SET gender='Male';
END IF;
RETURN CONCAT('Hello, ',name,' ',gender);
END $$;
DELIMITER;