Created
May 16, 2018 19:57
-
-
Save NavidMitchell/059d4c43aacd6d70e27f0b32d1c94263 to your computer and use it in GitHub Desktop.
Mysql Capitalize any given string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP FUNCTION IF EXISTS UC_FIRST; | |
CREATE FUNCTION UC_FIRST(oldWord VARCHAR(255)) RETURNS VARCHAR(255) | |
RETURN CONCAT(UCASE(SUBSTRING(oldWord, 1, 1)),SUBSTRING(oldWord, 2)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment