627, 1965 (leetcode)

는는·2023년 4월 10일
0

SQL - 문제 풀이

목록 보기
64/77

627.Swap Salary

https://leetcode.com/problems/swap-salary/?envType=study-plan&id=sql-i

UPDATE salary
    SET sex =
        CASE
            WHEN sex = 'f' THEN 'm'
            ELSE 'f'
        END;

1965. Employees With Missing Information


SELECT A.employee_id FROM Employees A LEFT JOIN Salaries B ON A.employee_id = B.employee_id WHERE salary is null
union
SELECT B.employee_id FROM Employees A RIGHT JOIN Salaries B ON A.employee_id = B.employee_id WHERE name is null
ORDER BY employee_id 

0개의 댓글