How to compare two tables with SQL

preview_player
Показать описание
Often you want to compare two tables to see if there are any differences in their rows.

The classic way to do this is with set operations. But this means reading all of both tables twice!

In this session, we'll look at other methods to do this, including full outer joins and group by queries.

Highlights include:

00:50 - Using set operations to compare tables
03:20 - Using full outer joins to compare tables
10:35 - Using group by to compare tables
13:50 - Demo of set operation method
15:15 - Demo of full outer join methods
19:00 - Demo of group by method
25:50 - Table comparison methods summary
27:50 - SQL macro comparison functions
29:50 - Comparing queries
31:40 - Finding table changes over time
34:20 - Unpivot to get column differences as rows
36:55 - Demo of comparison macro
37:50 - Demo of comparing queries
41:10 - Demo of finding table changes
43:20 - Demo of column differences
46:10 - Performance comparison demo
55:05 - Cheat sheet of approaches

Рекомендации по теме
Комментарии
Автор

The absolutly right video in the right moment. Thanks. 😅

AlexThunder
Автор

How we can use sql macros function in with clause. Sql macros thrown error when we use in with clause.

umeshg
Автор

Dang, why didn't i search for that info like 3 days ago. Would have spared me a headache. 😅

HaLo-tc