Can anyone help work out why this create function isn't working. I've copied it from a a program teaching me mySQL and I've double checked and it doesn't seem to work. any help greatly appreciated
Delimiter//
Create Function CAP_FIX(Input VARChar(255))
Returns varchar(255)
Deterministic
begin
Declare first Char;
Declare remainder varchar(255);
Set first = substring(input,1,1);
Set remainder = substring(input,2,char_length(input) -1);
Return concat(first, lower(remainder));
end//
Delimiter;