May 31, 2011 at 10:57 pm
What is the difference between inner join add equi-join in this two joins which one is more use full why?
May 31, 2011 at 11:47 pm
If I'm understanding you correctly...
Inner join is a join that's specified either as JOIN or INNER JOIN. The join predicate (comparison) can be anything. It requires matching rows.
An Equi-join is a join with an = specified. It can be INNER or OUTER.
INNER JOIN:
FROM tbl1 INNER JOIN tbl2 on <some condition>
Equi-join
FROM tbl1 <some join type> tbl2 ON tbl1.SomeCol = tbl2.SomeOtherColumn
It's not a case of which is better, it's a case of which you need.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 2, 2011 at 10:06 am
INNER and OUTER keywords are optional, and personally, I ommit them in my code.
"JOIN" means "INNER JOIN". If there is LEFT, RIGHT or FULL keywords, it is outer join - learn what they mean.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply