How to compare two columns to find unmatched records in MySQL

后端 未结 2 588
花落未央
花落未央 2021-02-04 17:40

I have a MySQL table with 2 columns and each column has thousands of records

For Example 15000 Email addresses in Column1 and 15005 Email addresses in column 2

H

2条回答
  •  既然无缘
    2021-02-04 18:25

    Not sure if I got it right... but would it be something like?

    select column2 from table
    where column2 not in (select column1 from table)
    

提交回复
热议问题