Bug #26340 apparent ambiguity could in principle be resolved by MySQL
Submitted: 13 Feb 2007 20:02 Modified: 4 Feb 2009 15:20
Reporter: Vladimir Kornea Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Parser Severity:S4 (Feature request)
Version:5.0.33 OS:Any
Assigned to: CPU Architecture:Any

[13 Feb 2007 20:02] Vladimir Kornea
Description:
SELECT
  EMPLOYEE_ID
FROM
  EMPLOYEES E,
  EMPLOYEE_SCHEDULES ES
WHERE
  E.EMPLOYEE_ID=ES.EMPLOYEE_ID;

Column 'EMPLOYEE_ID' in where clause is ambiguous

There's no real reason for this query to confuse MySQL. If a column in the select clause is ambiguous, it could check to see whether the column is used to join tables with an = operator and if so ambiguity gone.

How to repeat:
obvious
[4 Feb 2009 15:20] Susanne Ebrecht
Many thanks for writing a feature request.

Last century some RDBMS used to select here the column of the first table they could find. Anyway, the behaviour is given in actual SQL standard and we won't change this behaviour.