今天在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的更多相关文章

  1. Java开发问题:Column 'AAA' in where clause is ambiguous解决办法

    当在java开发中遇到了Column 'AAA' in where clause is ambiguous问题时, 你需要去看看:多表查询的时候不同的表是否出现了相同名称相同的列, 如果存在,你需要在 ...

  2. Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'org_mer_id' in where clause is ambiguous

    ### Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolatio ...

  3. Column ‘name’ in where clause is ambiguous;

    内容 一.异常信息 严重: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw except ...

  4. Column 'id' in where clause is ambiguous

    1.错误描述 org.hibernate.exception.ConstraintViolationException: error executing work at org.hibernate.e ...

  5. SQL语句之Column 'Status' in where clause is ambiguous错误

    问题: AND created_by IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) limit 0, 10]; Column 'created_by' in where cla ...

  6. [Err] 1052 - Column ‘roleId‘ in where clause is ambiguous

    1.先看错误的sql语句: select a.authName from roles as r,authority as a,role_ah as ra where ra.roleId=r.roleI ...

  7. Column 'orders' in order clause is ambiguous

    今天报了这个错误 原因是.当使用sql查询语句,使用了join查表.但是这个orders没指定是哪张表的字段 ,发生在自关联情况

  8. mysql错误:Column ‘id’ in field list is ambiguous的解决方法

    [Err] 1052 - Column 'modify_time' in where clause is ambiguous 出错的语句: SELECT AVG(T.se)%60FROM( SELEC ...

  9. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'dd' in 'where clause'

    今天在使用mysql数据库查找数据的时候报错,错误信息如下: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown co ...

随机推荐

  1. Docker镜像(六)

    一.镜像是什么 镜像是一种轻量级.可执行的独立软件包,用来打包软件运行环境和基于运行环境开发的软件,它包含运行某个软件所需的所有内容,包括代码.运行时.库.环境变量和配置文件. 1. UnionFS( ...

  2. 前端之CSS(下)

    文本属性 ## 文字对齐 #text-align属性规定元素中文本的水平对齐方式 left: 左边对齐 默认值 right: 右对齐 center: 居中对齐 justify: 两端对齐 ## 文字装 ...

  3. MySQL实战45讲学习笔记:第二十六讲

    一.引子 在上一篇文章中,我和你介绍了几种可能导致备库延迟的原因.你会发现,这些场景里,不论是偶发性的查询压力,还是备份,对备库延迟的影响一般是分钟级的,而且在备库恢复正常以后都能够追上来. 但是,如 ...

  4. python前后台tcp/udp通讯示例

    以下代码兼容python2.7+.python3 TCP示例 服务器 -- sever_tcp.py #!/usr/bin/env python #coding=utf-8 import time i ...

  5. springcloud(七,多个服务消费者配置,以及zuul网关案例)

    spring cloud (一.服务注册demo_eureka) spring cloud (二.服务注册安全demo_eureka) spring cloud (三.服务提供者demo_provid ...

  6. 第31课 std::atomic原子变量

    一. std::atomic_flag和std::atomic (一)std::atomic_flag 1. std::atomic_flag是一个bool类型的原子变量,它有两个状态set和clea ...

  7. ApartmentState.STA

    需要设置子线程 ApartmentState 为 STA 模式,但 Task 又不能直接设置 ApartmentState,因此需要用 Thread 来封装一下. using System.Threa ...

  8. Azure DevOps (TFS) 与 Office 集成

    Azure DevOps Service 或者Azure DevOps Server 都支持与office工具集成,实现在office中完成工作项的导入导出和批量修改等功能.用户可以使用自己熟悉的of ...

  9. snap应用多版本卸载

    Ubuntu18.04新增了几个内置软件使用Snap格式.同样的沙箱式处理方式,除了Canonical主推的Snap,还有Fedora的Flatpak和AppImage.一般正常使用没问题,就是第一次 ...

  10. RGB灯

    robotbit扩展板4个rgb灯,r-红,g-绿,b-蓝,值为0~255,可模拟出256*256*256种颜色. from microbit import * import neopixel r = ...