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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:03:43+00:00 2026-05-26T08:03:43+00:00

Okay, here’s what I’m doing with a MYSQL SELECT query. SELECT * FROM Customers

  • 0

Okay, here’s what I’m doing with a MYSQL SELECT query.

SELECT * FROM Customers
JOIN CustomerDetails USING (`Customer_ID`)
JOIN CustomerNotes USING (`Customer_ID`)
WHERE Customer_ID ='1'

This is fine and working like expected. What I would like to do is something along the lines of…

SELECT Customers.Customer_ID, Customers.CompanyName, Customers.ContactPerson
FROM Customers
JOIN CustomerDetails.Customer_ID, CustomerDetails.MinPurchase, CustomerDetails.Discount FROM CustomerDetails USING (`Customer_ID`)
JOIN CustomerNotes.Customer_ID, CustomerNotes.CustNotes FROM CustomerNotes USING (`Customer_ID`)
WHERE Customer_ID = '1'

That the idea I’m looking to reach here. I want to be able to tell the query what to get instead of *.
I’m using 3 tables Customers CustomerDetails CustomerNotes. Any ideas??? Thanks!

  • 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-05-26T08:03:44+00:00Added an answer on May 26, 2026 at 8:03 am
    SELECT 
    
        Customers.Customer_ID, 
        Customers.CompanyName, 
        Customers.ContactPerson,
    
        CustomerDetails.Customer_ID, 
        CustomerDetails.MinPurchase, 
        CustomerDetails.Discount,
    
        CustomerNotes.Customer_ID, 
        CustomerNotes.CustNotes
    
    FROM Customers
    JOIN CustomerDetails USING (`Customer_ID`)
    JOIN CustomerNotes USING (`Customer_ID`)
    WHERE Customers.Customer_ID = '1'
    

    You’d have to use “as” within each Customer_ID because they are the same. But I see no reason why you select Customer_ID twice. Just delete the duplicates. Final one:

    SELECT 
    
        Customers.Customer_ID, 
        Customers.CompanyName, 
        Customers.ContactPerson,
    
        CustomerDetails.MinPurchase, 
        CustomerDetails.Discount,
    
        CustomerNotes.CustNotes
    
    FROM Customers
    JOIN CustomerDetails USING (`Customer_ID`)
    JOIN CustomerNotes USING (`Customer_ID`)
    WHERE Customers.Customer_ID = '1'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay so here's what I'm doing. I'm making a request to a server to
Okay so here is the code that I am using function AddProducts($aTitle, $aDescription, $aPrice,
Okay so here's the thing: I have a linq query which loads approx. 1000
Okay so here's the lowdown... been working on this solution for the past week
Okay so here's the situation. I have this page of data. After the data
Okay i'm stuck on something here. This is the page i'm working on: https://www.passovermeal.org/
Okay this is my first post here so please forgive me if i mess
Okay, two admissions here, one is I'm sure this question has been answered and
Okay here's the program I have typed up(stdio.h is included also): /* function main
Okay so here is the deal. As the question states, I'm trying to POST

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.