为啥要简单问题复杂化?
select 
(select min(badate) from table2 houseid=hd.houseid) badate
from table1 hd;这样不可以么

解决方案 »

  1.   

    houseid=hd.houseid提出来
    where RNO= 1 and houseid=hd.houseid
      

  2.   

    ROW_NUMBER() OVER () 在9I里能使用吗? 
      

  3.   

    叼毛,用这个试试吧。 select 
      (select badate from( select badate,rank() OVER (partition by subject ORDER BY badate) RNO from table2 where houseid=hd.houseid) a where RNO= 1) as badate
      from table1 hd   
    如果不行就用左连接
    select 
      (select badate from( select  ht.badate
      from table1 hd left join table2 ht on hd.houseid = ht.houseit
    ) a where RNO= 1) as badate
      from table1 hd