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

  • Home
  • SEARCH
  • 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 8853415
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:38:49+00:00 2026-06-14T13:38:49+00:00

I have 3 tables relationship called tblCluster, tblServer, and tblDatabase. Server is under Cluster

  • 0

I have 3 tables relationship called tblCluster, tblServer, and tblDatabase. Server is under Cluster and Database is under Server. PK in tblCluster is ClusterName. Pk in tblServer is ServerName and FK is ClusterName. PK in tblDatabase is DatabaseName and FK is Servername. If I want to see all ServerName and DatabaseName under/from ClusterName is Cluster5. Should I write query like

SELECT tblCluster.ClusterName, tblServerName.ServerName, tblDatabase.DatabaseName 
FROM tblCluster 
JOIN tblServer 
ON tblCluster.ClusterName = tblServer.ClusterName 
INNER JOIN tblDatabase 
ON tblServer.ServerName = tblDatabase.ServerName 
WHERE tblCluster.ClusterName = Cluster5;

If servername is found even database is empty I still want it display result table of with datbasename null.

  • 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-14T13:38:50+00:00Added an answer on June 14, 2026 at 1:38 pm

    Have you tried using LEFT JOIN instead of INNER JOIN – this is typically the solution for such requirements. Look here for a more detailed explanation containing some examples.

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

Sidebar

Related Questions

I have two tables having 1 to 1 relationship. One table called Person and
I have 2 tables; they have a many-to-many relationship. One is called Blog the
I have two tables which are in a relationship. They are called tblX and
I have two tables connected with one to many relationship. Parent Table is a
I have two tables with primary foreign key relationship. The table in foreign key
I have two tables with a many to many relationship, through a third table.
I have two tables with a linking table describing their many-to-many relationship. TABLE buildings
I have two tables that should be joined together by a foreign key relationship,
Basicall I have three Tables Users Roles and USerRoles with Many to many Relationship.
I have 2 tables: users and subscribers . The relationship of the user to

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.