mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-06 07:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -5,23 +5,23 @@
|
||||
| Column Name | Type |
|
||||
+-------------+---------+
|
||||
| id | int |
|
||||
| name | varchar |
|
||||
| student | varchar |
|
||||
+-------------+---------+
|
||||
id is the primary key column for this table.
|
||||
id is the primary key (unique value) column for this table.
|
||||
Each row of this table indicates the name and the ID of a student.
|
||||
id is a continuous increment.
|
||||
</pre>
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p>Write an SQL query to swap the seat id of every two consecutive students. If the number of students is odd, the id of the last student is not swapped.</p>
|
||||
<p>Write a solution to swap the seat id of every two consecutive students. If the number of students is odd, the id of the last student is not swapped.</p>
|
||||
|
||||
<p>Return the result table ordered by <code>id</code> <strong>in ascending order</strong>.</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