日期:2014-05-16  浏览次数:20684 次

MYSQL查询别名指定
错误:Column 'create_user' in where clause is ambiguous

原因:[转自:http://blog.sina.com.cn/s/blog_54fde7ac0100ej9v.html?retcode=0]
在一次使用mysql数据库查询的时候出现错误提示 Column 'languageid' in where clause is ambiguous,这个错误in where clause is ambiguous多半是因为多表查询的时候几个表中同时出现了某个相同的列名,而在查询条件WHERE后面又没有指定是那个表,而引起的

又或者是查询结果里面有两个相同的列名,而没有指定是哪个表

使用的时候可以这样,mysql查询前面加表名可避免出现错误Column 'languageid' in where clause is ambiguous

SELECT tablea.id aid table.id bid WHERE tablea.id = tableb.id


http://hi.baidu.com/xfuajiao/blog/calendar/200907