select a,b from ta ,tb where ta.rowid=tb.rowid

解决方案 »

  1.   

    select a,b from ta full join tb on ta.rowid=tb.rowid
      

  2.   

    楼上的老大,如果没有rowid这一列是不是不行呢?
      

  3.   

    没有就只好借用临时表:
    select *,identity(int,1,1) rowid into #a from ta
    select *,identity(int,1,1) rowid into #b from tb
    select a,b from #a full join #b on #a.rowid=#b.rowid
      

  4.   

    用一楼的方法很明显TA的最后两行显示不出来.
    用二楼的方法报错:Unknown column 'sales.rowid' in 'on clause'