Skip to Main Content

Breadcrumb

May 4th

Question and Answer

Connor McDonald

Thanks for the question, Hamidreza.

Asked: February 28, 2018 - 3:13 pm UTC

Last updated: March 01, 2018 - 3:06 am UTC

Version: 12c

Viewed 1000+ times

You Asked

Hi Tom, I know how can I use equijoin and natural join but, I'd like to know when we use equijoin and when we use natural join? In which scenario or query we should use equijoin and in which scenario or query we should use natural join?

and Connor said...

I'm generally not a fan of natural joins.

See this link for a reason why

https://asktom.oracle.com/pls/asktom/asktom.search?tag=natural-join-and-index-monitoring-9ir2-slide-show

So I prefer to always explicitly list the columns in my join. Others may have differing opinions

Rating

  (1 rating)

Is this answer out of date? If it is, please let us know via a Comment

Comments

Martin Rose, March 07, 2018 - 4:34 pm UTC

Natural joins can be disasterous if you forget the ON clause. Don't use them, and confine them to the dustbin of history...

https://asktom.oracle.com/pls/asktom/asktom.search?tag=regarding-on-update-cascade#1084276700346890081

More to Explore

SQL

The Oracle documentation contains a complete SQL reference.