Is there a simple way to convert MySQL data into Title Case?

后端 未结 11 2197
太阳男子
太阳男子 2020-11-27 15:35

I have a MySQL table where all the data in one column was entered in UPPERCASE, but I need to convert in to Title Case, with recognition of \"small words\" akin to the Darin

11条回答
  •  时光取名叫无心
    2020-11-27 16:05

    The definitive case to look for such a function is in the documentation.

    Unfortunately, you've got LOWER() and UPPER() functions, but no Title Case. Your best bet would be to declare your own function that splits on spaces, ignores your small words, and does an UPPER on the first character of each remaining word.

提交回复
热议问题