https://leetcode.com/problems/fix-names-in-a-table/
Fix Names in a Table - LeetCode
Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.
leetcode.com
select user_id, concat(upper(left(name, 1)), lower(substring(name, 2))) as name
from Users
order by user_id;
Best
SELECT USER_ID, (CONCAT(UPPER(SUBSTR(NAME, 1, 1)), LOWER(SUBSTR(NAME, 2)))) AS NAME
FROM USERS ORDER BY USER_ID
References
https://jhnyang.tistory.com/417
[오라클, MySQL] 대소문자와 관련된 UPPER, LOWER, INITCAP함수 사용법. 대문자로 변경, 소문자로 변경
[DBMS 데이터베이스 SQL 완전정복 목차] 안녕하세요 양햄찌 블로그 주인장입니다. 오늘은 간단한 SQL문법에 대해 빠르게 포스팅을 진행해보려고 해요. ㅎㅎ 오늘 주제 주인공은 Upper, Lower, Initcap이
jhnyang.tistory.com
728x90
반응형
'자료구조 알고리즘 > 코딩테스트' 카테고리의 다른 글
1527. Patients With a Condition (0) | 2022.05.30 |
---|---|
1484. Group Sold Products By The Date (0) | 2022.05.30 |
196. Delete Duplicate Emails (0) | 2022.05.30 |
627. Swap Salary (0) | 2022.05.30 |
1873. Calculate Special Bonus (0) | 2022.05.30 |