Bug #246 | alias not recognized when selecting only one table's fields from joined tables | ||
---|---|---|---|
Submitted: | 8 Apr 2003 3:12 | Modified: | 8 Apr 2003 6:05 |
Reporter: | [ name withheld ] | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | Connector / J | Severity: | S2 (Serious) |
Version: | 3.0.6,3.1.0 | OS: | Windows (windows 2000 professional) |
Assigned to: | CPU Architecture: | Any |
[8 Apr 2003 3:12]
[ name withheld ]
[8 Apr 2003 6:05]
Mark Matthews
This is a known issue. You can't create updatable result sets on queries with aliases, because MySQL versions prior to version 4.0 don't return the original table names. You must use MySQL-4.1 if you want to be able to do this.
[16 Apr 2003 19:51]
[ name withheld ]
Thanks for your answer. But why does it return correct result when I select more than 2 fields from different tables? e.g: select a.id,b.name from tb_a a inner join tb_b b on a.id=b.id it will return correct result. but when I execute query: select a.id,a.name from tb_a a inner join tb_b b on a.id=b.id, it return the exception. So the emphasis is whether the selected fields are from different table, i.e. whether the different alias appear in the column names. Is this known feature of Mysql4.0.11? And Why doesn't happen with Connect/J 2.0.14?