table1是左表,table2是右表,使用了left join,结果将显示左表的所有列及右表符合条件的列(符合ON条件的列).

解决方案 »

  1.   

    对不起,补充一点应该是;
        select table1.* from table1
               LEFT JOIN table2 ON table1.id=table2.id
               where table2.id is NULL;
        该语句表示什么意义?及 left join还有那些用法?能否具体一点?
        分数会再加!
      

  2.   

    这句话是为了解决mysql中没有子查询的方法!
    意思是:
    找出不在table2中的,只在tables1中的记录相当于普通的子查询:
    select id from t1 where id not in(select id from t2) left join就这些用法,没有更多的了!