Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
Tags
- elastic net
- github
- 깃헙협업
- CSS
- AWS
- HTML
- PYTHON
- 교차 엔트로피
- L2정규화
- 버전충돌
- conflict
- coding
- full request
- sql
- branch
- programmers
- early stopping
- hackerrank
- 온라인협업
- window function
- 코딩공부
- mysql
- merge
- leetcode
- 클라우드컴퓨팅
- 선형 모형
- 편향-분산 교환
- Git
- L1정규화
- RLIKE
Archives
- Today
- Total
Im between cherry
Leet Code | MySQL | 627. Swap Salary 본문
627. Swap Salary
https://leetcode.com/problems/swap-salary/
Given a table salary, such as the one below, that has m=male and f=female values. Swap all f and m values (i.e., change all f values to m and vice versa) with a single update statement and no intermediate temp table.
Note that you must write a single update statement, DO NOT write any select statement for this problem.
After running your update statement, the above salary table should have the following rows:
UPDATE salary
SET sex = CASE
WHEN sex = 'f' THEN 'm'
ELSE 'f'
END
'데이터분석 > practice_query' 카테고리의 다른 글
Leet Code | MySQL | 180. Consecutive Numbers (0) | 2020.08.30 |
---|---|
Leet Code | MySQL | 196. Delete Duplicate Emails (0) | 2020.08.30 |
Leet Code | MySQL | 181. Employees Earning More Than Their Managers (0) | 2020.08.30 |
Hackerrank | MySQL | The Report (0) | 2020.08.30 |
Hackerrank | MySQL | Challenges (0) | 2020.08.29 |
Comments