Re: Query and join problem with null values

2001-12-07 Thread Michael Delorme
Thanks ! It's exactlly what I wanted. I got the same result a few seconds ago using EMS MySQL Manager but I didn't understand how. Your example is much better ! What is the difference between a LEFT JOIN and a LEFT OUTER JOIN ? And of course you're right for the data type ; Thanks again A

Re: Query and join problem with null values

2001-12-07 Thread Etienne Marcotte
mysql> create table users( -> usrID smallint unsigned auto_increment, -> usrZip char(5), -> primary key(usrID)); Query OK, 0 rows affected (0.00 sec) mysql> create table cities( -> ctyZip char(5) not null, -> ctyName varchar(30) not null, -> primary key(ctyZip)); Query OK,

RE: Query and join problem with null values

2001-12-07 Thread Michael Delorme
Thanks for your answer. It's quite logical indeed... I'm new to SQL ! Does it mean that I can't query on several tables at once if some keys have a NULL value or is there another way ? What I want is one line for my peopleId 2, built with informations from several tables... Or in other words I

RE: Query and join problem with null values

2001-12-07 Thread rick herbel
Michael do the first join people.zip = city.zip yo get 2 rows from people 1 and 3 notice there is no peopleid 2 from first join so correct answer is to retun null Rick -Original Message- From: Michaƫl Delorme [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 11:00 AM To: [EMA