How to insert or update rows in one statement: Databases for Developers #17

preview_player
Показать описание
Sometimes when adding rows to your database need update-if-exists, insert-if-not-exists logic. Aka an upsert.

You could write this as separate update and insert statements. But there is an easier way:

Merge!

Watch this video for an overview of how merge works.

Further reading:

============================
The Magic of SQL with Chris Saxon

Copyright © 2015 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Рекомендации по теме
Комментарии
Автор

This is probably the best youtube channel to learn SQL. Hats off to you. Please keep uploading this kind of videos.

bestjokesever
Автор

Thank you so much, this is a life-saver 🙏

vincentenrouelibre
Автор

Does the merge query works effectively while processing large volumes of data?

debpatro
Автор

will you suggest for single statement for insert and update using oracle ?

gvoohxm
Автор

Hi iam getting error when iam running in postgresql what to do help me out

rohitkumar-nksd
Автор

hi sir i have question i have two daya base have big data want to put data in data base 1 into data base 2 there are 20 table and the two data base have same keys and relation ship

TheNanamimijojo
Автор

All of sudden performance decreased, we didn't change any code . Even DBA unable to trce the issue. Pls suggest cuases

JanaSainik_jsp
Автор

Can you make few videos on MATCH RECOGNIZE

Pluto