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
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,
>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
: [EMAIL PROTECTED]
Subject: Query and join problem with null values
Hi guys
I have a problem on a SQL query : I got no records selected. Below
is a sample of my 2 tables :
A table identifying people, containing their adress therefore a ZIP
code. However for some people I don't have their a
Hi guys
I have a problem on a SQL query : I got no records selected. Below
is a sample of my 2 tables :
A table identifying people, containing their adress therefore a ZIP
code. However for some people I don't have their adress, so no ZIP code :
Table People
+--+--+
| PeopleID