MySQL NOT IN from another column in the same table

后端 未结 5 2043
天涯浪人
天涯浪人 2021-02-09 00:32

I want to run a mysql query to select all rows from a table films where the value of the title column does not exist anywhere in all the values of anot

5条回答
  •  北海茫月
    2021-02-09 01:11

    Another option using an outer join

    SELECT f.* 
    FROM films f LEFT OUTER JOIN films ff
    ON f.title = ff.collection
    WHERE ff.collection IS NULL
    

提交回复
热议问题