A表:  id  name
 ----------
  01   aaa
  02   bbbB表:  id  name
 -----------
  11   ccc
  12   ddd查询结果:    id  name
   ----------
    01   aaa
    02   bbb
    11   ccc
    22   ddd这个语句怎么写,谢谢

解决方案 »

  1.   

    select * from A union all selece * from B
      

  2.   

    select * from a
    union all
    select * from b
      

  3.   

    select * from (select * from a
    union all
    select * from b ) a oder by id
      

  4.   

    select * from (select * from a
    union all
    select * from b ) a order by id
      

  5.   

    不好意思发错地方了我用的是 MY SQL人家报下面的错误:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'selece * from painting_bt_type' at line 1
      

  6.   

    谢谢 berwos(专心做一个多面的人) 谢谢 谢谢 谢谢 谢谢
      

  7.   

    MY  SQL  也支持 呵呵