Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Some basic questions on Oracle SQL

ll vvvcAug 26 2024

Hi,

I have some SQL knowledge and recently got assigned to an Oracle based db. Got a bit confused on Oracle SQL. Hope someone can explain some basic questions on Oracle SQL.

I keep seeing queries like:

select * 
from table 1 join table 2 on condition 1 
             join table 3 on condition 2 
             join table 4 on condition 3 
where some other condition 4

Can someone explain what exactly is happening here? Is the query above the same as

select * 
from table 1, table 2, table 3, table 4 
where condition 1 and condition 2 and condition 3 and condition 4 

?

Also, for the original query, what exactly is being executed? Does it:

  • pull out table 1 and table 2, apply condition 1
  • then use the results to inner join table 3 with condition 2
  • then use the results to inner join table 4, with condition 3
  • then apply condition 4 to the final results

Is this execution plan the same as the other query listed above?

Finally, is there some good document illustrate Oracle SQL? Will be better it has some explanation on the execution plan sent to DB server.

Thank you!

Comments
Post Details
Added on Aug 26 2024
2 comments
175 views