关于sql的问题
oracle:
原:
a视图
select strA1,strA2,strA3 from a where strA4= 'aaa' and strA5='bbb'
b视图
select strB1,strB2 from b where strB3=strA4 and strB4=strA5 and strB5=strA3 and rownum=1
c视图
select strC1 from c where strC2=strA4 and strC2=strA5 and rownum=1
三个视图的关系:
a视图:b视图 1:n
a视图:c视图 1:n
b视图和c视图没关系
现要将三张视图合并以a视图为主视图,
我的结果
select strA1,strA2,strA3 ,strB1,strB2,strC1
from a left join b on strB3=strA4 and strB4=strA5 and strB5=strA3
left join c on strC2=strA4 and strC2=strA5
where strA4= 'aaa' and strA5='bbb'
取得结果本应为1条,但得到的结果却为多条,该怎样解决这类问题
求大神指点迷津