- DROP FUNCTION IF EXISTS uc_first;
- DELIMITER $$
- CREATE FUNCTION uc_first(str LONGTEXT)
- RETURNS LONGTEXT
- BEGIN
- SET @firstChar = SUBSTRING(str, 1,1);
- SET @remainingChars = SUBSTRING(str, 2);
- RETURN CONCAT(UPPER(@firstChar), @remainingChars);
- END
- $$
- DELIMITER ;
No comments:
Post a Comment