Skip to content

Instantly share code, notes, and snippets.

@NavidMitchell
Created May 16, 2018 19:57
Show Gist options
  • Save NavidMitchell/059d4c43aacd6d70e27f0b32d1c94263 to your computer and use it in GitHub Desktop.
Save NavidMitchell/059d4c43aacd6d70e27f0b32d1c94263 to your computer and use it in GitHub Desktop.
Mysql Capitalize any given string
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