select ID,Name from student
union all
select ID,Name from teacher

解决方案 »

  1.   

    select * from student , teacher
      

  2.   

    Select  ID, Name From student
    Union All
    Select  ID, Name From teacher
      

  3.   

    想问下楼上的几位哥哥,
    如果我想实现查询Teacher表中的所有字段,Student表中无此字段就写入Null值该如何呢?
      

  4.   

    yuxing117(雨行) ( ) 信誉:100    Blog  2007-03-20 11:01:49  得分: 0  
     
     
       想问下楼上的几位哥哥,
    如果我想实现查询Teacher表中的所有字段,Student表中无此字段就写入Null值该如何呢?
      ---------------------
    Select  ID, Name,Age, Null From student
    Union All
    Select  ID, Name, Age, Department From teacher