mysql搜索一张表数据不在另一张中

select sales_flat_order.entity_id
from sales_flat_order
where not exists (
select 1
from download_tracknumber
where download_tracknumber.id = sales_flat_order.entity_id
)

posted @ 2015-08-20 15:38  Forward1990  阅读(193)  评论(0编辑  收藏  举报