Ad Code

MySQL function to change the first letter into upper case.

CREATE FUNCTION ucfirst(x varchar(255)) returns varchar(255)
return concat( upper(substring(x,1,1)),lower(substring(x,2)) );


SELECT ucfirst("TEST");

+-----------------+
| ucfirst("TEST") |
+-----------------+
| Test            |
+-----------------+

Post a Comment

0 Comments