Oracle curcular join sometimes give duplicates, but sometimes does not

Posted by Kaushik on Stack Overflow See other posts from Stack Overflow or by Kaushik
Published on 2012-09-28T21:18:16Z Indexed on 2012/09/28 21:37 UTC
Read the original article Hit count: 214

Filed under:
|

By mistake I wrote a query like this:

select * from a,b,c where a.col=b.col and b.col2=c.col2 and c.col3=a.col4

So there is a circular join here. Now the thing is sometimes this query returns duplicate result, sometimes it returns unique(correct) results. I am trying to understand why it does not give duplicate results always. Also if circular joins are not allowed, how come Oracle does not throw an error.

EDIT: This is the actual query. After reading ti carefully, I am not sure anymore if this is a circular join or not.It does not seem so...but why I get duplicates only sometime?

select * from a,b,c,d where a.col=b.col and b.col=c.col and c.col2=d.col2 and d.col2 =a.col2

© Stack Overflow or respective owner

Related posts about join

Related posts about oracle11g