The tables used in the SELECT:
CREATE TABLE `Salespeople` (
`snum` int(11) NOT NULL default '0',
`sname` char(10) NOT NULL default '',
`city` char(10) default NULL,
`comm` decimal(10,2) default NULL,
PRIMARY KEY (`snum`)
) TYPE=InnoDB
--------------------------------------------------------
CREATE TABLE `Orders` (
`onum` int(11) NOT NULL default '0',
`amt` decimal(10,2) default NULL,
`odate` date NOT NULL default '0000-00-00',
`cnum` int(11) NOT NULL default '0',
`snum` int(11) NOT NULL default '0',
PRIMARY KEY (`onum`),
KEY `cnum` (`cnum`),
KEY `snum` (`snum`),
CONSTRAINT `0_57` FOREIGN KEY (`snum`) REFERENCES `Salespeople` (`snum`),
CONSTRAINT `0_58` FOREIGN KEY (`cnum`) REFERENCES `Customers` (`cnum`)
) TYPE=InnoDB |

According to the book I am reading ("Mastering SQL" -hence not for MySQL!!) the following statements should produce the same result. But they don't. I have no idea why. I am using 4.0.15 and I am thinking this might be a syntax issue (differing from the standard).
------------------------------------------------------------------------
1.
SELECT sname, onum
FROM Salespeople NATURAL LEFT OUTER JOIN Orders
WHERE odate = '2003-03-10' ORDER BY 1;
------------------------------------------------------------------------
2.
SELECT sname, onum
FROM Salespeople s LEFT JOIN Orders o
ON odate = '2003-03-10' AND s.snum = o.snum
ORDER BY 1;
------------------------------------------------------------------------
Both queries should do the same thing only written in different way. Is that so.
Here are the results from the queries:
--------------------------------------------------------------------------
1.
+--------+------+
| sname | onum |
+--------+------+
| Motika | 3002 |
| Peel | 3003 |
| Rifkin | 3001 |
| Rifkin | 3006 |
| Serres | 3005 |
+--------+------+
-------------------------------------------------------------------------
2.
+---------+------+
| sname | onum |
+---------+------+
| Axelrod | NULL |
| Motika | NULL |
| Peel | NULL |
| Rifkin | NULL |
| Serres | NULL |
+---------+------+

Any ideas what the problem is? Thanks in advance. btw the first query seems to produce the correct results.