mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-03 22:42:52 +08:00
存量题库数据更新
This commit is contained in:
@@ -9,21 +9,21 @@
|
||||
| sex | ENUM |
|
||||
| salary | int |
|
||||
+-------------+----------+
|
||||
id is the primary key for this table.
|
||||
The sex column is ENUM value of type ('m', 'f').
|
||||
id is the primary key (column with unique values) for this table.
|
||||
The sex column is ENUM (category) value of type ('m', 'f').
|
||||
The table contains information about an employee.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>Write an SQL query to swap all <code>'f'</code> and <code>'m'</code> values (i.e., change all <code>'f'</code> values to <code>'m'</code> and vice versa) with a <strong>single update statement</strong> and no intermediate temporary tables.</p>
|
||||
<p>Write a solution to swap all <code>'f'</code> and <code>'m'</code> values (i.e., change all <code>'f'</code> values to <code>'m'</code> and vice versa) with a <strong>single update statement</strong> and no intermediate temporary tables.</p>
|
||||
|
||||
<p>Note that you must write a single update statement, <strong>do not</strong> write any select statement for this problem.</p>
|
||||
|
||||
<p>The query result format is in the following example.</p>
|
||||
<p>The result format is in the following example.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong>
|
||||
|
Reference in New Issue
Block a user