column 'XXXX' in field list is ambiguous

原因:表中包含同名字段 'xxxx'

如:select name from a,b where a.id=b.id    因为a、b2表里都有name字段

解决:字段前加上具体表名,如: select a.name from a,b where a.id=b.id

posted @ 2012-11-16 10:14  dafa168  阅读(183)  评论(0编辑  收藏  举报