2022-03-27 20:45:09 +08:00
|
|
|
|
<p>表: <code>Users</code></p>
|
|
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
|
+----------------+---------+
|
|
|
|
|
| Column Name | Type |
|
|
|
|
|
+----------------+---------+
|
|
|
|
|
| user_id | int |
|
|
|
|
|
| name | varchar |
|
|
|
|
|
+----------------+---------+
|
2023-12-09 18:42:21 +08:00
|
|
|
|
user_id 是该表的主键(具有唯一值的列)。
|
2022-03-27 20:45:09 +08:00
|
|
|
|
该表包含用户的 ID 和名字。名字仅由小写和大写字符组成。
|
|
|
|
|
</pre>
|
|
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
|
<p>编写解决方案,修复名字,使得只有第一个字符是大写的,其余都是小写的。</p>
|
2022-03-27 20:45:09 +08:00
|
|
|
|
|
|
|
|
|
<p>返回按 <code>user_id</code> 排序的结果表。</p>
|
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
|
<p>返回结果格式示例如下。</p>
|
2022-03-27 20:45:09 +08:00
|
|
|
|
|
|
|
|
|
<p> </p>
|
|
|
|
|
|
2023-12-09 18:42:21 +08:00
|
|
|
|
<p><strong class="example">示例 1:</strong></p>
|
2022-03-27 20:45:09 +08:00
|
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
|
<strong>输入:</strong>
|
|
|
|
|
Users table:
|
|
|
|
|
+---------+-------+
|
|
|
|
|
| user_id | name |
|
|
|
|
|
+---------+-------+
|
|
|
|
|
| 1 | aLice |
|
|
|
|
|
| 2 | bOB |
|
|
|
|
|
+---------+-------+
|
|
|
|
|
<strong>输出:</strong>
|
|
|
|
|
+---------+-------+
|
|
|
|
|
| user_id | name |
|
|
|
|
|
+---------+-------+
|
|
|
|
|
| 1 | Alice |
|
|
|
|
|
| 2 | Bob |
|
|
|
|
|
+---------+-------+</pre>
|