select * from tk_in00 where exists (select shop_id,alt_id from tk_inalert00 where tk_in00.shop_id=tk_inalert00.shop_id and tk_in00.in_id=tk_inalert00.alt_id)
Ôõô²éѯ³ö δ²åÈëµÄÊý¾Ý¼Ç¼select * from tk_in00 where not exists (select shop_id,alt_id from tk_inalert00 where tk_in00.shop_id=tk_inalert00.shop_id and tk_in00.in_id=tk_inalert00.alt_id)
exists
¸Ä³Énot exists²»¾Í¿ÉÒÔÁËô SQL code: select * from tk_inalert00 where not exists (select shop_id,alt_id from tk_in00 where tk_in00.shop_id=tk_inalert00.shop_id and tk_in00.in_id=tk_inalert00.alt_id)