有4张表,A表主表,A的外键有NULL,要级联出所有数据怎么办“
select a.name,b.name,c.name from a,b,c,d where a.bid=b.id and b.cid=c.id and c.did = d.id
这是我的SQL,但是a.bid有null值,所有这样的查出来的数据就把null的记录给过滤掉了,我想把null值也给查出来,不知道怎么办,我试了,or a.bid is null但是不行,合并结果集就不要了;
我采用的是hibernate,extjs,其实SQL应该查出来的是select new a(a.b.id,b.name,..) from a,b,c,d where ...