/*------------------------------------------------------------------ Creating a very simple hello_func(string) function ------------------------------------------------------------------*/ DROP FUNCTION hello_func; / CREATE FUNCTION hello_func (input VARCHAR(20)) RETURNS VARCHAR(30) BEGIN -- ========================= -- Param: input varchar(20) -- ========================= RETURN CONCAT('Hello ', input); END; / SELECT hello_func('Sam');