Join vs. Where (help)

2003-06-25 Thread tlr7425
This: SELECT * FROM machines INNER JOIN people ON machines.machinesID=people.peopleID; Is not producing the same results as this: SELECT lastname, model FROM people, machines WHERE machines.peopleID = people.peopleID; Can someone please tell why, what's wrong? (What happens is that the wrong

Re: Join vs. Where (help) -(I got it!)

2003-06-25 Thread tlr7425
Ok, should be this: SELECT * FROM machines INNER JOIN people ON machines.peopleID=people.peopleID; Ted This: SELECT * FROM machines INNER JOIN people ON machines.machinesID=people.peopleID; Is not producing the same results as this: SELECT lastname, model FROM people, machines WHERE

Re: Join vs. Where (help)

2003-06-25 Thread George Christoforakis
Erm, the first sql as i can see doesn't connect on the same field as the second one that produces the correct result. George Christoforakis - Original Message - From: [EMAIL PROTECTED] To: MySQL List [EMAIL PROTECTED] Sent: Wednesday, June 25, 2003 9:01 AM Subject: Join vs. Where (help

Re: Join vs. Where (help)

2003-06-25 Thread Nils Valentin
2003 6 25 15:[EMAIL PROTECTED] : This: SELECT * FROM machines INNER JOIN people ON machines.machinesID=people.peopleID; Inludes NULL records Is not producing the same results as this: SELECT lastname, model FROM people, machines WHERE machines.peopleID = people.peopleID; Dosent

Re: Join vs. Where (help)

2003-06-25 Thread Nils Valentin
Hi tlr7425, Besides what I said in my last e-mail I completely overlooked that SELECT * FROM machines INNER JOIN people ON machines.machinesID=people.peopleID; should be SELECT * FROM machines INNER JOIN people ON machines.peopleID=people.peopleID; Even though my first statement should

Re: Join vs. Where (help)

2003-06-25 Thread tlr7425
What do you mean when you say, in this case, "does not return the NULL record"? I have no records that are completely "NULL" though some records do have a NULL field or two? Thanks, Ted On Wednesday, June 25, 2003, at 02:42 AM, Nils Valentin wrote: Hi

Re: Join vs. Where (help)

2003-06-25 Thread Nils Valentin
SELECT * FROM machines INNER JOIN people ON machines.peopleID=people.peopleID; Inludes NULL records I meant the first statement returns also empty record fields or should I say incomplete data records ? Is not producing the same results as this: SELECT lastname, model FROM

Re: Join vs. Where (help)

2003-06-25 Thread Bruce Feist
Nils Valentin wrote: SELECT * FROM machines INNER JOIN people ON machines.peopleID=people.peopleID; Inludes NULL records I meant the first statement returns also empty record fields or should I say incomplete data records ? Is not producing the same results as

Re: Join vs. Where (help) -(I got it!)

2003-06-25 Thread gerald_clark
In the second query, the server may switch the order of the join, producing the same output in different order. Try adding an ORDER BY to both and see what happens. [EMAIL PROTECTED] wrote: Ok, should be this: SELECT * FROM machines INNER JOIN people ON machines.peopleID=people.peopleID; Ted

Re: Join vs. Where (help)

2003-06-25 Thread Nils Valentin
Hi Bruce; I havent read Pauls book, but I will try to make an sample, also to confirm for myself what I stated before. I will come back to it once more. I am not sure if I should create a now post for this or continue this threat as it s kind of attached to it. Thank you for your reply. Best

Re: Join vs. Where (help)

2003-06-25 Thread Nils Valentin
Hi Bruce, tlr7425 and MySQl List, 2003 6 26 10:25Nils Valentin : Hi Bruce; I havent read Pauls book, but I will try to make an sample, also to confirm for myself what I stated before. I will come back to it once more. I am not sure if I should create a now post for this or continue this