Mysql
 sql >> Base de Dados >  >> RDS >> Mysql

Alternativa de NOT IN no MySQL


Uma alternativa seria usar um LEFT JOIN:
select distinct t.phoneNum
from Transaction_Register t
left join Subscription s
  on t.phoneNum = s.phoneNum
where s.phoneNum is null
LIMIT 0 , 1000000;

Consulte SQL Fiddle with Demo