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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:18:04+00:00 2026-06-13T12:18:04+00:00

I have three tables as follows, Table1- num |info ———- 1 |aaaaa 2 |bbbb

  • 0

I have three tables as follows,

Table1-
num |info
----------
1   |aaaaa  
2   |bbbb
3   |ccc
3   |ccc
4   |dddd

Table2-
num |info
----------
1   |aaaaa
3   |ccc
4   |dddd
5   |eeee
6   |ffff

Table3-
num |info
----------
1   |aaaaa
6   |ffff
2   |bbbb

the result i want to obtain is,

Result-
num |info   num |info   num |info
----------- ----------- ----------
1   |aaaaa  1   |aaaaa  1   |aaaaa
2   |bbbb   NULL|NULL   2   |bbbb
3   |ccc    3   |ccc    NULL|NULL
3   |ccc    3   |ccc    NULL|NULL
4   |dddd   4   |dddd   NULL|NULL
NULL|NULL   6   |ffff   6   |ffff

OR

Result 2-
num |info   num |info   num |info
----------- ----------- ----------
1   |aaaaa  1   |aaaaa  1   |aaaaa
2   |bbbb   NULL|NULL   2   |bbbb
3   |ccc    3   |ccc    NULL|NULL
3   |ccc    3   |ccc    NULL|NULL
4   |dddd   4   |dddd   NULL|NULL
NULL|NULL   5   |eeee   NULL|NULL
NULL|NULL   6   |ffff   6   |ffff

If there is a way to retrieve either one of the given results would be great 🙂
Thank you very much 🙂 .. i tried using a full join like so,

    SELECT *
    FROM tbl_1 AS a
    LEFT OUTER JOIN tbl_2 AS b ON a.num = b.num
    UNION
    SELECT *
    FROM tbl_1 AS a
    RIGHT OUTER JOIN tbl_2 AS b ON a.num = b.num

But its good for only 2 tables, if full join is the solution how to perform this?? if not how can i derive the result i want from the given three tables??

I tried searching but none helped to perform this task.

and i asked the question Join multiple tables (Special condition) but it didnt help..thought it might be unclear thats why i posted again 🙂

  • 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-13T12:18:05+00:00Added an answer on June 13, 2026 at 12:18 pm

    This question was resolved by @Andreas Wederbrand,

    Full join for 3 tables

    Implementing a full join was the solution for my query.

    Hope it helps for anyone who comes across this issue 🙂

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

Sidebar

Related Questions

I have three tables in MSSQL for a game which are structured as follows:
I have three tables as follows: MasterTable +----------+-------------+ | MasterId | MasterName | +----------+-------------+
So, I'm going to say that I have three tables as follows: POSTS POSTS_TAGS
I have three tables as follows user(username address) profile(fname,lname,mobile) details(performance,activity) I want all information
alright, so lets say i have three tables, as follows : employees( ID ,
i have 2 tables as follows sales (table1): sales_id, userid(buyerid), product id, productname, orderid,
I have three tables setup: POSTS, DISCUSSIONS, and COMMENTS. The layout is as follows:
I have three tables like follows: products id | name 1 | name1 2
I have three tables which I want to query in MySQ. As follows: **Table:
In my database I have three tables as follows: Tasks (TaskID, TaskName, TaskDescription) TaskDetails

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.