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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:25:24+00:00 2026-06-15T17:25:24+00:00

Looking at this solution: MySql Join three tables I see that I can join

  • 0

Looking at this solution: MySql Join three tables

I see that I can join 3 tables by doing something like this:

select s.name "Student", c.name "Course"
from student s, bridge b, course c
where b.sid = s.sid and b.cid = c.cid 

But it seems like I can only select a single column from each table? I need to join multiple colums from 3 tables with sys_visits being the main table where userID=contrID (sys_users, sys_visits) and clientID=clientID (sys_client, sys_visits)

SELECT pid, clientID, contrID, serviceDate, serviceStart, serviceStop FROM sys_visits
SELECT userGroupID, userID, fname, lname FROM sys_users
SELECT clientID, clientFName, clientLName FROM sys_client ORDER BY clientLName ASC

I’ve tried numerous variations and can’t seem to get the syntax correct?

  • 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-15T17:25:25+00:00Added an answer on June 15, 2026 at 5:25 pm

    use the ANSI SQL-92 format of join instead.

    SELECT  a.*, b.*, c.*
    FROM    sys_users a
            INNER JOIN sys_visits b
                ON a.userID = b.contrlD
            INNER JOIN sys_client c
                ON b.clientID = c.clientID
    

    the use of asterisks in the query indicates that you are selecting all columns from the tables. If you want to only choose specific columns, declare the column names explicitly on the query, example:

    SELECT  a.userGroupID, a.userID, a.fname, a.lname,
            b.*, 
            c.*
    FROM    sys_users a
            INNER JOIN sys_visits b
                ON a.userID = b.contrlD
            INNER JOIN sys_client c
                ON b.clientID = c.clientID
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Looking for a non-JS solution. Say I had something like this: <ul> <li> <form>
I've been spending hours looking for a solution on this problem. As you can
I have exhausted my searches looking for a solution to this MySQL date calculation.
I'm looking for the generally accepted/best solution to this problem. Problem I have a
I'm looking for a nice tight regex solution to this problem. I'm looking to
I've been looking around for a solution to this thing but I haven't found
I am looking for a general and complete solution to this common problem! I
I came across this thread when I was looking for a solution, but it
Hey there, I'm doing some queries to a MySQL database that involves some user-input..
I'm looking for a solution that will allow my Rails app to render a

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.