http://expert.csdn.net/Expert/FAQ/FAQ_Index.asp?id=40441
IN/Not IN 子选择的问题

解决方案 »

  1.   

    mysql不支持子查询。
    看看这样可不可以:
    select distinct t1.a from table1 as t1, table2 as t2 where t1.a<>t2.a;
      

  2.   

    对不起,上面的好像不对。还是 shuixin13(犬犬(心帆)) 的有道理。
    SELECT  table1.*  FROM  table1  LEFT  JOIN  table2  ON  table1.id=table2.id WHERE  table2.id  IS  NULL;  
      

  3.   

    這種語句在mysql中大數據量會跑死掉?