java mybatis Column 'AAA' in where clause is ambiguous

Posted 护花使者

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java mybatis Column 'AAA' in where clause is ambiguous相关的知识,希望对你有一定的参考价值。

 

  

  今天在java mybatis项目中遇到一个问题,“java mybatis Column ‘AAA‘ in where clause is ambiguous”, 这是由于在多表连接查询的时候,遇上有相同的字段,这个需要设置一下表名的前缀:

例:

select * from lw_table lt where lt.column =  ‘xxxx‘

在相关的地方加上lt前缀就可以了。这个错误也提醒开发写条件语句的时候最好是附上表明的前缀。

以上是关于java mybatis Column 'AAA' in where clause is ambiguous的主要内容,如果未能解决你的问题,请参考以下文章