Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dev-guide-update-data.md to fix a Chinese grammar problem (#16857) (#16861) #16863

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update develop/dev-guide-update-data.md
  • Loading branch information
hfxsd authored and ti-chi-bot committed Mar 21, 2024
commit 4587992f389215bb8b379f23b9e86b3a63fa5290
2 changes: 1 addition & 1 deletion develop/dev-guide-update-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ INSERT INTO {table} ({columns}) VALUES ({values})

### `INSERT ON DUPLICATE KEY UPDATE` 最佳实践

- 在仅有一个唯一键的表上使用 `INSERT ON DUPLICATE KEY UPDATE`。此语句在检测到任何 **_唯一键_** (包括主键) 冲突时,将更新数据。在不止匹配到一行冲突时,将只会更新第一行数据。因此,除非能保证仅有一行冲突,否则不建议在有多个唯一键的表中使用 `INSERT ON DUPLICATE KEY UPDATE` 语句。
- 在仅有一个唯一键的表上使用 `INSERT ON DUPLICATE KEY UPDATE`。此语句在检测到任何 **_唯一键_** (包括主键) 冲突时,将更新数据。在不止匹配到一行冲突时,将只会更新一行数据。因此,除非能保证仅有一行冲突,否则不建议在有多个唯一键的表中使用 `INSERT ON DUPLICATE KEY UPDATE` 语句。
- 在创建或更新的场景中使用此语句。

### `INSERT ON DUPLICATE KEY UPDATE` 例子
Expand Down
Loading