Leetcode学习笔记:#627. Swap Salary

Leetcode学习笔记:#627. 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.

实现:

UPDATE salary SET sex = IF(sex = 'm', 'f', 'm')
上一篇:single.py


下一篇:单细胞数据库汇总