解决方案 »

  1.   

    a_id a_name a_status a_price a_pic a_asc b_id a_id b_name b_status b_price b_pic b_asc
    是要输出这种数据吗!
    这个关联条件是   a_id!=b.a_id,造成的情况就太多了吧!
      

  2.   

    select * from a
    union all
    select * from b where b.a_id not in (select a_id from a);
      

  3.   

    select *,'' from a
     union all
     select * from b left join  a on b.a_id=a.a_id where a.a_id is null
      

  4.   

    select * from 表a
    union all
    select * from 表b left join 表a where 表a.a_id=表b.a_id where 表a.a_id is null
      

  5.   

    表的字段是不一样的,union all会输出,一样的或者一样类型的数据
    要求是,先显示表a里面的数据,完了然后显示表b里面的数据,翻页列表里的 表a表b 数据连接也是不同的,去向不同的页面
    竟然有这种要求,难倒我了