Bug #15339 | Can not utilization USING clause after an ON clause in SELECT queries | ||
---|---|---|---|
Submitted: | 30 Nov 2005 2:29 | Modified: | 30 Nov 2005 12:16 |
Reporter: | Eddie Mayfield | Email Updates: | |
Status: | Not a Bug | Impact on me: | |
Category: | MySQL Server | Severity: | S2 (Serious) |
Version: | 5.0.16-nt | OS: | Windows (Windows XP) |
Assigned to: | CPU Architecture: | Any |
[30 Nov 2005 2:29]
Eddie Mayfield
[30 Nov 2005 6:05]
Jorge del Conde
Thanks for your bug report. I was able to repeat this under XP and FC4 using a recent 5.0bk clone
[30 Nov 2005 12:16]
Valeriy Kravchuk
Everything works just as you described, but it is not a bug. Please, read the manual (http://dev.mysql.com/doc/refman/5.0/en/join.html) carefully. In your last statement: SELECT a.id, a.value, b.value, c.value, d.value FROM a INNER JOIN b ON a.id=b.id INNER JOIN c ON b.id=c.id INNER JOIN d USING(id); a INNER JOIN b ON a.id=b.id INNER JOIN c ON b.id=c.id will produce 3 id columns, and, surely, it is not possible to decide which one of them to use for the natural join with table d.