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!
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: