1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Upsertについて

Posted at

Upsertとは
INSERT文を実行する際、すでにデータが存在すれば UPDATEを実行し、なければそのままINSERT文を実行する

利用ケース

データの同期

外部のデータソースからデータベースにデータを同期する場合、Upsert操作によって既存のレコードを更新し、新しいレコードを追加することができる。

効率的なバッチ処理

多数のレコードを処理する際に、各レコードを個別にチェックして更新または挿入するのではなく、Upsertを用いることで効率的に処理を行うことができる。

参考

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?