mysql> select * from beers; +----+-----------+--------+ | ID | name | colour | +----+-----------+--------+ | 1 | carlsburg | 2 | | 2 | tuburg | 1 | | 3 | tuburg | 9 | +----+-----------+--------+ 3 rows in set (0.00 sec)
mysql> select * from colours; +----+--------+ | id | colour | +----+--------+ | 1 | red | | 2 | green | | 3 | blue | +----+--------+ 3 rows in set (0.00 sec)
mysql> select * from beers inner join colours on beers.colour = colours.ID; +----+-----------+--------+----+--------+ | ID | name | colour | id | colour | +----+-----------+--------+----+--------+ | 1 | carlsburg | 2 | 2 | green | | 2 | tuburg | 1 | 1 | red | +----+-----------+--------+----+--------+ 2 rows in set (0.00 sec)
mysql> select * from beers outer join colours on beers.colour = colours.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 on beers.colour = colours.ID' at line 1
So I've gone looking the fine manual, here: http://dev.mysql.com/doc/refman/5.6/en/join.html
The manual references natural outer joins and requires curly brackets and I'm frankly not making sense of it. Left, right, and inner joins work as I expect them too, and fishing for examples in google doesn't find anything unusual. How exactly am I erring?
Thanks!
-- 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=listsearcharchive@lassosoft.com
Oct 19
Dotan Cohen Re: What is wrong with this outer join?
Oct 19, 2011; 17:00
Dotan Cohen
Re: What is wrong with this outer join?
Oct 19
Shawn Green (MySQL Re: What is wrong with this outer join?
Oct 19, 2011; 12:00
Shawn Green (MySQL
Re: What is wrong with this outer join?
Oct 19
Dotan Cohen Re: What is wrong with this outer join?
Oct 19, 2011; 19:19
Dotan Cohen
Re: What is wrong with this outer join?
Oct 19
Shawn Green (MySQL Re: What is wrong with this outer join?
Oct 19, 2011; 15:10
Shawn Green (MySQL
Re: What is wrong with this outer join?
Oct 20
Dotan Cohen Re: What is wrong with this outer join?
Oct 20, 2011; 02:03
Dotan Cohen
Re: What is wrong with this outer join?
Oct 19
Hal?sz S?ndor Re: What is wrong with this outer join?
Oct 19, 2011; 12:55
Hal?sz S?ndor
Re: What is wrong with this outer join?
Oct 20
Shawn Green (MySQL Re: What is wrong with this outer join?
Oct 20, 2011; 10:11
Shawn Green (MySQL
Re: What is wrong with this outer join?
Oct 20
Peter Brawley Re: What is wrong with this outer join?
Oct 20, 2011; 13:30
Peter Brawley
Re: What is wrong with this outer join?
Oct 20
Dotan Cohen Re: What is wrong with this outer join?
Oct 20, 2011; 23:59
Dotan Cohen
Re: What is wrong with this outer join?
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!