I have doubt in Sql Server

  • What is the difference between inner join add equi-join in this two joins which one is more use full why?

  • 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

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • 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.

    _____________________________________________________
    Microsoft Certified Master: SQL Server 2008
    XDetails Addin - for SQL Developers
    blog.sqlxdetails.com - Transaction log myths

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply