Bug #16190 | Unknown column in 'on clause' | ||
---|---|---|---|
Submitted: | 4 Jan 2006 15:36 | Modified: | 4 Jan 2006 15:55 |
Reporter: | Igor Rud | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S3 (Non-critical) |
Version: | 5.0.18 | OS: | Linux (Red Hat 9) |
Assigned to: | MySQL Verification Team | CPU Architecture: | Any |
[4 Jan 2006 15:36]
Igor Rud
[4 Jan 2006 15:55]
MySQL Verification Team
Please read: http://dev.mysql.com/doc/refman/5.0/en/join.html Where you will notice changes performed in join's syntax since 5.0.12. Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 5.0.19-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> select * from subscribers a, messages b left join additional_information c on -> a.id=c.subscriber_id where a.id=b.subscriber_id; ERROR 1054 (42S22): Unknown column 'a.id' in 'on clause' mysql> select * from (subscribers a, messages b) left join additional_information c on -> a.id=c.subscriber_id where a.id=b.subscriber_id; +----+-------+------------+---------------+---------+---------------+-------+ | id | name | message_id | subscriber_id | message | subscriber_id | info | +----+-------+------------+---------------+---------+---------------+-------+ | 1 | John | 1 | 1 | test1 | 1 | info1 | | 2 | Denis | 2 | 2 | test2 | 2 | info2 | | 3 | Ron | 3 | 3 | test3 | 3 | info3 | +----+-------+------------+---------------+---------+---------------+-------+ 3 rows in set (0.01 sec)