日期:2014-05-17  浏览次数:20855 次

一个很简单的问题
from (select bt.* from (select distinct(ht.bookrecno) from holding_temp ht) t1 left join biblios_temp bt on (t1.bookrecno=bt.bookrecno)) t;


上面就是两个表 
里面那么多 T1 HT T BT的都是设么用到 去掉我看的懂 
不知道这些标识设么用到

------解决方案--------------------
t和t1 是标识存在表的别名 相当于简写了 而别名ht和bt用来标识构造的新表 方便关联和查询


SQL code
from (
       select bt.* 
       from (
              select distinct ht.bookrecno
              from holding_temp ht
            ) t1 
       left join biblios_temp bt on t1.bookrecno=bt.bookrecno
     ) t;