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 8470487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:31:57+00:00 2026-06-10T16:31:57+00:00

I have 4 tables I need to join in a query. I want all

  • 0

I have 4 tables I need to join in a query. I want all results from table 1, and then any want to join any results from table 1,2,3. I’m not sure how to write this query.

Here is my best guess:

SELECT
 *
FROM
 t1
INNER JOIN
(
 t2 on t2.id = t1.id
 FULL OUTER JOIN t3 on t3.id = t1.id
 FULL OUTER JOIN t4 on t4.id = t1.id
)

I did find this post that explains the different types of joins. From this I believe I want either a left or right join for table1, but then I am confused about the nested statement.

  • 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-10T16:31:59+00:00Added an answer on June 10, 2026 at 4:31 pm

    The key to your question is that you want all results from table 1. This implies a left outer join:

        select *
        from t1 left outer join
             t2
             on t1.id = t2.id left outer join
             t3
             on t1.id = t3.id left outer join
             t4
             on t1.id = t4.id
    

    The left outer joins keep all the records on the “first” or “before” table, but not records from the second table. Because you start with t1, all those records will be kept with only the matches to t2, and so on.

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

Sidebar

Related Questions

I have 3 tables I need to join. The contracts table is the main
I have two tables, jos_eimcart_customers_addresses and jos_eimcart_customers. I want to pull all records from
I need a query to prevent a join that produces 1.34218E+35 results! I have
I have a table with more than 100 columns. I need to join it
I have 3 tables, I need advice on how to get data from them.
I have two tables described below. What I need is a single query that
i have 5 tables,in every table it has 4 rows. so i need to
I have 3 tables. Table A contains the data that my query is going
I have 3 tables that I need to join, these join together fine using
I need to bind two tables into a dataset. I have three table named,

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.