column 'id' in field list is ambiguous

column 'id' in field list is ambiguous 
这个错误,是因为你查询语句里面有id字段的时候,没有说明是哪个表的id字段,应该加上表名(或者别名)来区分。

用表名进行区分的例子:
select student.id, student.name, score.total
from student, score
where student.id = score.id

mysql> create view com

    -> as

    -> select test.id,test.age

    -> from test,users

    -> where test.id=users.id;

转载于:https://my.oschina.net/mkh/blog/80888