2008年11月21日

主表与子表的其中一条left join

摘要: select * from fathertable a LEFT JOIN childtable d on d.HouseID = a.HouseID and d.MoveInFlag=0 and d.id=(select max(id) from childtable where houseid=a.houseid) 不能把后面的子句写在where中 阅读全文

posted @ 2008-11-21 09:26 优雅小猪 阅读(1974) 评论(0) 推荐(1) 编辑

导航