MySQL: Create a function

The following code produces a sample function in MySQL:

CREATE FUNCTION hello (s CHAR(20)) 
RETURNS CHAR(50) DETERMINISTIC
RETURN CONCAT('Hello, ',s,'!');

Leave a Reply