mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
42 lines
1.0 KiB
HTML
42 lines
1.0 KiB
HTML
<p>Table: <code>Users</code></p>
|
|
|
|
<pre>
|
|
+----------------+---------+
|
|
| Column Name | Type |
|
|
+----------------+---------+
|
|
| user_id | int |
|
|
| name | varchar |
|
|
+----------------+---------+
|
|
user_id is the primary key (column with unique values) for this table.
|
|
This table contains the ID and the name of the user. The name consists of only lowercase and uppercase characters.
|
|
</pre>
|
|
|
|
<p> </p>
|
|
|
|
<p>Write a solution to fix the names so that only the first character is uppercase and the rest are lowercase.</p>
|
|
|
|
<p>Return the result table ordered by <code>user_id</code>.</p>
|
|
|
|
<p>The result format is in the following example.</p>
|
|
|
|
<p> </p>
|
|
<p><strong class="example">Example 1:</strong></p>
|
|
|
|
<pre>
|
|
<strong>Input:</strong>
|
|
Users table:
|
|
+---------+-------+
|
|
| user_id | name |
|
|
+---------+-------+
|
|
| 1 | aLice |
|
|
| 2 | bOB |
|
|
+---------+-------+
|
|
<strong>Output:</strong>
|
|
+---------+-------+
|
|
| user_id | name |
|
|
+---------+-------+
|
|
| 1 | Alice |
|
|
| 2 | Bob |
|
|
+---------+-------+
|
|
</pre>
|