select t2.B from table2 t2,table1 t1 where t2.A=t1.A

解决方案 »

  1.   

    这样应该不行只能显示table2的B字段
      

  2.   

    select table1.A, if(isnull(table2.B), table1.B, table2.B) from table1 left join table2 on table1.A=table2.A
      

  3.   

    select table1.A, isnull(table2.B,table1.B) from table1 left join table2 on table1.A=table2.A这样写就可以了。
      

  4.   

    SELECT t1.A, t2.B FROM table1 t1, table2 t2 WHERE t1.A=t2.A;