mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-07 08:21:41 +08:00
批量更新数据
This commit is contained in:
@@ -12,12 +12,12 @@
|
||||
"translatedContent": "<p>表: <code>Employee</code></p>\n\n<pre>\n+-------------+------+\n| Column Name | Type |\n+-------------+------+\n| id | int |\n| salary | int |\n+-------------+------+\n在 SQL 中,id 是该表的主键。\n该表的每一行都包含有关员工工资的信息。\n</pre>\n\n<p> </p>\n\n<p>查询 <code>Employee</code> 表中第 <code>n</code> 高的工资。如果没有第 <code>n</code> 个最高工资,查询结果应该为 <code>null</code> 。</p>\n\n<p>查询结果格式如下所示。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong> \nEmployee table:\n+----+--------+\n| id | salary |\n+----+--------+\n| 1 | 100 |\n| 2 | 200 |\n| 3 | 300 |\n+----+--------+\nn = 2\n<strong>输出:</strong> \n+------------------------+\n| getNthHighestSalary(2) |\n+------------------------+\n| 200 |\n+------------------------+\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong> \nEmployee 表:\n+----+--------+\n| id | salary |\n+----+--------+\n| 1 | 100 |\n+----+--------+\nn = 2\n<strong>输出:</strong> \n+------------------------+\n| getNthHighestSalary(2) |\n+------------------------+\n| null |\n+------------------------+</pre>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 758,
|
||||
"likes": 795,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"similarQuestions": "[{\"title\": \"The Number of Users That Are Eligible for Discount\", \"titleSlug\": \"the-number-of-users-that-are-eligible-for-discount\", \"difficulty\": \"Easy\", \"translatedTitle\": \"\\u6709\\u8d44\\u683c\\u4eab\\u53d7\\u6298\\u6263\\u7684\\u7528\\u6237\\u6570\\u91cf\", \"isPaidOnly\": true}]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false}",
|
||||
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false, \"cangjie\": false}",
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
@@ -31,19 +31,19 @@
|
||||
{
|
||||
"lang": "MySQL",
|
||||
"langSlug": "mysql",
|
||||
"code": "-CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\n-BEGIN\n- RETURN (\n- # Write your MySQL query statement below.\n-\n- );\n-END",
|
||||
"code": "CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT\nBEGIN\n RETURN (\n # Write your MySQL query statement below.\n\n );\nEND",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "MS SQL Server",
|
||||
"langSlug": "mssql",
|
||||
"code": "-CREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS\n-BEGIN\n- RETURN (\n- /* Write your T-SQL query statement below. */\n-\n- );\n-END",
|
||||
"code": "CREATE FUNCTION getNthHighestSalary(@N INT) RETURNS INT AS\nBEGIN\n RETURN (\n /* Write your T-SQL query statement below. */\n\n );\nEND",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Oracle",
|
||||
"langSlug": "oraclesql",
|
||||
"code": "-CREATE FUNCTION getNthHighestSalary(N IN NUMBER) RETURN NUMBER IS\n-result NUMBER;\n-BEGIN\n- /* Write your PL/SQL query statement below */\n-\n- RETURN result;\n-END;",
|
||||
"code": "CREATE FUNCTION getNthHighestSalary(N IN NUMBER) RETURN NUMBER IS\nresult NUMBER;\nBEGIN\n /* Write your PL/SQL query statement below */\n\n RETURN result;\nEND;",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
@@ -59,7 +59,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"227.8K\", \"totalSubmission\": \"489.3K\", \"totalAcceptedRaw\": 227804, \"totalSubmissionRaw\": 489276, \"acRate\": \"46.6%\"}",
|
||||
"stats": "{\"totalAccepted\": \"252.8K\", \"totalSubmission\": \"548.1K\", \"totalAcceptedRaw\": 252847, \"totalSubmissionRaw\": 548105, \"acRate\": \"46.1%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
@@ -75,7 +75,7 @@
|
||||
"insert into Employee (id, salary) values ('3', '300')"
|
||||
],
|
||||
"enableRunCode": true,
|
||||
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"envInfo": "{\"mysql\":[\"MySQL\",\"<p>\\u7248\\u672c\\uff1a<code>MySQL 8.0<\\/code><\\/p>\"],\"mssql\":[\"MS SQL Server\",\"<p>mssql server 2019.<\\/p>\"],\"oraclesql\":[\"Oracle\",\"<p>Oracle Sql 11.2.<\\/p>\"],\"pythondata\":[\"Pandas\",\"<p>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4<\\/p>\"],\"postgresql\":[\"PostgreSQL\",\"<p>PostgreSQL 16<\\/p>\"]}",
|
||||
"book": null,
|
||||
"isSubscribed": false,
|
||||
"isDailyQuestion": false,
|
||||
|
Reference in New Issue
Block a user