IN versus EXISTS - are they the same?

Поділитися
Вставка
  • Опубліковано 13 гру 2024

КОМЕНТАРІ • 13

  • @osmane888
    @osmane888 10 місяців тому +2

    Thanks a lot, i've been struggling to graps the logic behind using one or another, especially in my class where there is that querry as example that i struggled to understand until i watched the video, it really helped me "visualize" how it works. Thanks again !

  • @agermoune
    @agermoune 7 місяців тому +1

    Thanks Doug for the Not in explanation, I don’t know how only your video made me grasp the reason why we don’t get result set. Again Thank you!

    • @agermoune
      @agermoune 7 місяців тому

      Do you have any other Chanel or platform where you post more videos?

    • @DatabasebyDoug
      @DatabasebyDoug  6 місяців тому

      @@agermoune Hi, and thanks for asking! I'm going to start working on this channel again. Stay tuned, and let me know if you have any good video ideas that would help you!😀

    • @agermoune
      @agermoune 6 місяців тому

      ​@@DatabasebyDoug@DatabasebyDoug I'm looking forward to your upcoming content (already subscribed!). I'm especially interested in videos covering:
      Inner Join vs. Left Join: when filtering should occur (ON vs. WHERE clause).
      Best practices for SQL syntax and formatting: any additional tips beyond what you've already shared would be great.
      Advanced SQL case scenarios
      I'm happy to pay for your content and would love to know if you offer any Udemy or LinkedIn courses. Thanks for your excellent teaching style!

  • @ОлексійМоренець
    @ОлексійМоренець 7 місяців тому +2

    is 'NOT CategoryId IN' the same as 'CategoryId NOT IN' ? I've never seen the first option...

    • @DatabasebyDoug
      @DatabasebyDoug  6 місяців тому +2

      Yes, they are the same. I had to try some examples to make sure that NULL handling was the same. But you might *need* to move the NOT away from the IN to do something like WHERE NOT (CategoryID IN (1,2,3) OR another_condition)

  • @gideaomartins9096
    @gideaomartins9096 Рік тому

    I never thought about that!

  • @iulianciobanu6824
    @iulianciobanu6824 4 місяці тому

    great video :)

  • @juststudying1019
    @juststudying1019 2 роки тому +1

    Thanks

  • @mexicanmomo
    @mexicanmomo Рік тому +1

    Interesting. But what if someone uses an outer join in "not exists", then both becomes same.

  • @subhasdas501
    @subhasdas501 Рік тому +1

    Thanks