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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:57:23+00:00 2026-05-19T23:57:23+00:00

I have 3 tables that I am trying to combine into one with a

  • 0

I have 3 tables that I am trying to combine into one with a query. One table”Main” has the primary key “AppID” and the other two tables “Net & Env” uses this key as a foreign key. What I am trying to do is make a join on the Main and Net AppID, for every appid that exist in Net and also for every Appid that exist in Env. My idea is that if I do a join on the Main and Net, then the only thing left is the AppIds in sync, but I want to also do the join from Main to Env. My query is:

SELECT Main.Name FROM ((Main INNER JOIN Net On Main.AppID=Net.AppID)INNER JOIN 
Env On Env.AppID=Main.AppID);

Do I need to have a subquery for the outer join. I know that the abover query is not giving me my desire results. Let me know if my question is unclear.

  • 1 1 Answer
  • 1 View
  • 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-05-19T23:57:24+00:00Added an answer on May 19, 2026 at 11:57 pm

    Use a LEFT JOIN

    SELECT m.Name FROM Main m LEFT JOIN Net n ON n.AppID=m.AppID LEFT JOIN Env e ON e.AppID=m.AppID;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a mysql query that is trying to combine the following tables: TABLE:
I am trying to combine 5 queries into one query so that I do
Basically I'm trying to combine two tables together into a new table. The first
I have 2 tables that I'm trying to combine in order to do a
Trying to sort this out... I need a query that will combine both tables
Ok, I have a SQL query that I'm trying to generate that will combine
I have a 3 tables that I'm trying to join and get distinct results.
I have several tables that I am selecting data from. I am trying to
I'm trying to normalize a mysql database.... I currently have a table that contains
I have a data.frame and I'm trying to create a frequency table that shows

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.