select * from custominfo where customId not in (select customId from salesinfo) 1 利用連接配接join來實作,速度會更快。