[LeetCode]

민지킴·2022년 10월 31일
0

LeetCode

목록 보기
4/4
post-thumbnail

Repo : https://github.com/courage331/LeetCode/tree/main/1667-fix-names-in-a-table
풀이 : 첫글자만 대문자로 바꾸는 문제였다. INITCAP이라는 함수는 mysql에서 지원하지 않기에 Upper와 Lower를 이용한뒤에 concat을 이용하여 합쳤다.

select user_id, concat(substring(UPPER(name),1,1), substring(LOWER(name),2)) as name
from users
order by user_id
profile
하루하루는 성실하게 인생 전체는 되는대로

0개의 댓글