Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7854553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:05:51+00:00 2026-06-02T20:05:51+00:00

I’m studying inner joins and I´m a old WHERE SQL-92 man. I’d like to

  • 0

I’m studying inner joins and I´m a old WHERE SQL-92 man. I’d like to know the implications and understand how it works. So this is just a theoretical question about SQL joins.
Is this…

 SELECT * FROM   -- Query 1
 tbl1
 INNER JOIN (
          tbl2 
          INNER JOIN (
             tbl3 INNER JOIN tbl4 ON tbl3.Col1 = tbl4.Col1 
          ) 
          ON tbl2.col1 = tbl3.col2
 ) 
 ON tbl1.col1 = tbl3.col3

…the same as this?

 SELECT * FROM   -- Query 2
 tbl3 
 INNER JOIN tbl4 ON tbl3.col1 = tbl4.col1
 INNER JOIN tbl2 ON tbl2.col1 = tbl3.col2
 INNER JOIN tbl1 ON tbl1.col1 = tbl3.col3

…or this (not sorted by logical resolution)?

  SELECT * FROM   -- Query 3
  tbl3 
  INNER JOIN tbl1 ON tbl1.col1 = tbl3.col3
  INNER JOIN tbl2 ON tbl2.col1 = tbl3.col2
  INNER JOIN tbl4 ON tbl3.col1 = tbl4.col1

..or this (reference node changed; see there’s a table referenced before it is cited, but the Cartesian product should be the same)

  SELECT * FROM   -- Query 4
  tbl4 
  INNER JOIN tbl1 ON tbl1.col1 = tbl3.col3
  INNER JOIN tbl2 ON tbl2.col1 = tbl3.col2
  INNER JOIN tbl3 ON tbl4.col1 = tbl3.col1

..or this?

  SELECT * FROM   -- Query 5 
  tbl1,tbl2,tbl3,tbl4
  WHERE 
  tbl3.col1 = tbl4.col1
  tbl2.col1 = tbl3.col2
  tbl1.col1 = tbl3.col3

…from aesthetic, syntactic, best practice and functional points of view?

It´s a very open question but I think is pretty interesting for the community to throw some light!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T20:05:53+00:00Added an answer on June 2, 2026 at 8:05 pm

    All database engines I’ve been closely working with (this is SQL Server, Oracle, PostgreSQL, MySQL, Sybase, SQLite, Informix and Firebird) will optimize it to the same plan.

    The fourth query, however, won’t parse on all engines (you cannot reference a table in an ON clause before it had been used in a JOIN clause)

    MySQL offers STRAIGHT_JOIN clause which affects the join order used in the plan.

    In Oracle, there is a hint /*+ ORDERED */ and in SQL Server there is a similar hint FORCE ORDER. If a query uses these hints, the plan order will be affected by the join order as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
Does anyone know how can I replace this 2 symbol below from the string
I have some data like this: 1 2 3 4 5 9 2 6
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
this is what i have right now Drawing an RSS feed into the php,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.