How to find which emails are in the same lists?

前端 未结 2 454
野性不改
野性不改 2021-01-07 15:10

I have a 11 tables [email1, email2, email3, ... email11]



        
2条回答
  •  有刺的猬
    2021-01-07 15:19

    MySQL UNION operator allows you to combine two or more result sets from multiple tables into a single result set

    SELECT Contact_Email FROM email1
    UNION
    SELECT Contact_Email FROM email2
    UNION
    SELECT Contact_Email FROM email3
    .
    .
    UNION
    SELECT Contact_Email FROM email11
    

    By default, the UNION operator eliminates duplicate rows from the result even if you don’t use DISTINCT operator explicitly.

提交回复
热议问题