How to compare two tables with SQL

Поделиться
HTML-код
  • Опубликовано: 24 окт 2023
  • 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
    Get the scripts livesql.oracle.com/apex/lives...
    Read the blog post blogs.oracle.com/sql/post/how...
    Test your SQL syntax knowledge with SQuizL; a free, daily guess the SQL statement quiz bit.ly/SQuizL-game
  • НаукаНаука

Комментарии • 7

  • @AlexThunder1980
    @AlexThunder1980 9 месяцев назад +2

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

    • @TheMagicofSQL
      @TheMagicofSQL 9 месяцев назад +1

      You're welcome, glad this helped!

  • @stephenyang8204
    @stephenyang8204 9 месяцев назад +2

    Got a lot, thanks

  • @nasimchaklader126
    @nasimchaklader126 9 месяцев назад +2

    Amazing

  • @user-bk9wt8gk1q
    @user-bk9wt8gk1q 6 месяцев назад

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

  • @umeshg1011
    @umeshg1011 9 месяцев назад +1

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

    • @TheMagicofSQL
      @TheMagicofSQL 9 месяцев назад +1

      This is a current limitation; hopefully it'll be possible in a future release