On Wed, Oct 19, 2011 at 16:33, Michael Dykman <mdyk...@gmail.com> wrote: > Try this. Â I sometime get wierd results when I fail to use aliases in a > join. Â Also, the parentheses are required. > Â - md > Â select * from beers b inner join colours c on (b.colour = c.ID); >
Thank you Michael. That does work, however when I convert it to an outer join I get the same error as before: mysql> select * from beers b inner join colours c on (b.colour = c.ID); +----+-----------+--------+----+--------+ | ID | name | colour | id | colour | +----+-----------+--------+----+--------+ | 1 | carlsburg | 2 | 2 | green | | 2 | tuburg | 1 | 1 | red | +----+-----------+--------+----+--------+ 2 rows in set (0.30 sec) mysql> select * from beers b outer join colours c on (b.colour = c.ID); ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'outer join colours c on (b.colour = c.ID)' at line 1 mysql> -- Dotan Cohen http://gibberish.co.il http://what-is-what.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org