Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select email
- from Email_Table t1
- where not exists (select email
- from Contacted_table t2
- where t1.email = t2.email)
- select email
- from Email_Table t1
- where email not in (select email
- from Contacted_table)
- SELECT email FROM email_table e
- LEFT JOIN contacted_table c ON e.email = c.email
- WHERE c.email IS NULL
- SELECT users.email, contacted.email
- FROM users LEFT JOIN contacted ON users.email = contacted.email
- users.email | contacted.email
- -----------------------------
- aa@aa.com | aa@aa.com
- bb@bb.com | bb@bb.com
- cc@cc.com | cc@cc.com
- dd@dd.com | NULL
- ee@ee.com | NULL
- SELECT users.email
- FROM users LEFT JOIN contacted ON users.email = contacted.email
- WHERE contacted.email IS NULL
Add Comment
Please, Sign In to add comment