SQL | NOT IN Vs NOT EXISTS (Which one to use?)

Поделиться
HTML-код
  • Опубликовано: 15 янв 2025

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

  • @phdjdoug4899
    @phdjdoug4899 Год назад +2

    This is the best video explanation I've come across so far that helps me understand not only the difference between NOT IN and NOT EXISTS, but also EXISTS more broadly. Thank you!

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

    Awesome explanation madam, really appriciate your videos... I was banging my head why (NOT IN) operator is not woring as expected.. now after watching your video I know why.

  • @blse2000
    @blse2000 8 месяцев назад

    Amazing, Thank you.

  • @catherine__s490
    @catherine__s490 Год назад

    Thank you, this was really helpful.

  • @shekhark1139
    @shekhark1139 Год назад

    This video is very handy, corelated subquery and where conditions.

  • @reachrishav
    @reachrishav 2 года назад

    Interesting concept of null comparison in SQL. Thank you!

  • @hv0032113
    @hv0032113 Год назад

    Very informative

  • @rk-ej9ep
    @rk-ej9ep 2 года назад

    Nice explanation...👍

  • @florincopaci6821
    @florincopaci6821 2 года назад

    Thank you for another usefull video.
    I have a question - there is any difference when we make a inner join comparing with a join on exists not where having a 1 to many relationship?
    Thank you

  • @NB20079
    @NB20079 Год назад

    Hi, how to fix this. After creating a table, I can't see where the table is?Before I had the success of creating a table but now i can't see the table after creating the table, Thank you

  • @manjutharak
    @manjutharak Год назад

    What is difference between IN Operator and EXISTS Operator ?Which is Faster? can you make it video on this

  • @waynehamberg9248
    @waynehamberg9248 3 месяца назад

    Very few columns should have NULL values and if you are having to do special coding consideration for a NULL column then you have a bad database design. If you have a NOT you might want to consider making a temp table and then joining that temp table rather than doing a NOT EXISTS or NOT IN. Better definition is that EXISTS should be used when you have a ONE-to-ONE relationship and IN where you have something in a collection.

  • @SurajitMetya
    @SurajitMetya 2 года назад

    please provide the create and insert table scripts this will help everyone

    • @filipzivkovic4866
      @filipzivkovic4866 2 года назад

      -- dbo.Employee table
      create table dbo.TblEmployee
      (
      EmpID INT not null PRIMARY KEY,
      DeptID INT not null,
      SubDeptID NCHAR (10)
      )
      -- Inserted values
      INSERT into dbo.TblEmployee (EmpID, DeptID, SubDeptID)
      VALUES
      (1001,1,'A'),
      (1002,2,'X'),
      (1003,3,'A'),
      (1004,4,'A'),
      (1005,5,'A')
      -- dbo.TblDept
      create table dbo.TblDept
      (
      DeptID INT not null IDENTITY(1,1) PRIMARY KEY,
      SubDeptID NCHAR(10) not null
      )
      -- Inserted values
      insert into dbo.TblDept (SubDeptID)
      VALUES
      ('A'),
      ('A'),
      ('B'),
      ('A')

    • @filipzivkovic4866
      @filipzivkovic4866 2 года назад

      My bad, I forgot to add the NULL in the TblDept table

    • @Mrroy08657
      @Mrroy08657 Год назад

      @@filipzivkovic4866
      Hi bro plz tell : where is less Work load , less work Pressure & less Working Hrs. - as a Data Analyst or as Machine learning Engineer or as a Data Scientists ?

  • @SurajitMetya
    @SurajitMetya 2 года назад

    It Should be "............WHERE DEPTID NOT EXISTS............" . can you elaborate more............