SQL语句之Column 'Status' in where clause is ambiguous错误
问题:
AND created_by IN (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
limit 0, 10]; Column 'created_by' in where clause is ambiguous; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'created_by' in where clause is ambiguous

原因:
说明SQL语句中有重复的created_by功能调用,并且在Mapper文件中,多表关联查询中有相同的字段,在查询条件里,没有指定别名。

解决:
只需要给相同的字段加上别名即可

SQL语句之Column 'Status' in where clause is ambiguous错误的更多相关文章
- Column ‘name’ in where clause is ambiguous;
内容 一.异常信息 严重: Servlet.service() for servlet [dispatcherServlet] in context with path [] threw except ...
- [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 ...
- java mybatis Column 'AAA' in where clause is ambiguous
今天在java mybatis项目中遇到一个问题,“java mybatis Column 'AAA' in where clause is ambiguous”, 这是由于在多表连接查询的时候,遇上 ...
- 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 ...
- Column 'id' in where clause is ambiguous
1.错误描述 org.hibernate.exception.ConstraintViolationException: error executing work at org.hibernate.e ...
- Java开发问题:Column 'AAA' in where clause is ambiguous解决办法
当在java开发中遇到了Column 'AAA' in where clause is ambiguous问题时, 你需要去看看:多表查询的时候不同的表是否出现了相同名称相同的列, 如果存在,你需要在 ...
- MySql: Column 'XXXX' in field list is ambiguous 错误
[Err] 1052 - Column 'XXXX' in field list is ambiguous 例如: SELECT id, a.name, price, `describe`, scho ...
- Column 'orders' in order clause is ambiguous
今天报了这个错误 原因是.当使用sql查询语句,使用了join查表.但是这个orders没指定是哪张表的字段 ,发生在自关联情况
- ORACLE查询当前连接的用户信息及操作的SQL语句
ORACLE--查询当前连接的用户信息及操作的SQL语句 select sid, status, v$session.username 用户名, last_call ...
随机推荐
- 【windows 操作系统】【CPU】用户模式和内核模式(用户层和内核层)
所有的现代操作系统中,CPU是在两种不同的模式下运行的: 注意以下内容来自微软: windows用户模式和内核模式 运行 Windows 的计算机中的处理器有两个不同模式:用户模式 和内核模式 . 用 ...
- 小白学python第1问: int 占几个字节?
windows 64位机器,python3.7:后面的文章中,没有特别说明的话,都是在该环境下运行 int 占几个字节? C语言中(GCC编译器),int 占据4个字节,python呢? 我们用pyt ...
- redis部署以及各种数据类型使用命令等详解
参考:https://www.cnblogs.com/pyyu/p/9843950.html redis博客地址 编译安装redis 开始部署 [root@mcw01 ~]$ ls anaconda ...
- Java:List(二)——List、ArrayList、LinkedList
List 模块:java.util.List 说明 List接口,表明一个序列 用法:List <E> ①直接用List承接一个ArrayList或LinkedList List < ...
- ibv_free_device_list()函数
void ibv_free_device_list(struct ibv_device **list); 描述 函数用来释放当前可用的RDMA设备数组. 注意 数组一旦释放,指向设备的指针将不能再由i ...
- WPF优秀组件推荐之LiveCharts
概述 LiveCharts是一个比较漂亮的WPF图表控件,在数据变化时还会有动画切换的效果,并且样式也可以控制. 官方网站:Live Charts (lvcharts.net) 开源代码:GitHub ...
- Solon 1.6.30 发布,更现代感的应用开发框架
相对于 Spring Boot 和 Spring Cloud 的项目 启动快 5 - 10 倍 qps 高 2- 3 倍 运行时内存节省 1/3 ~ 1/2 打包可以缩小到 1/2 ~ 1/10(比如 ...
- Redis常用命令代码实例集合
//连接本地的 Redis 服务 $redis = new Redis(); $redis->connect('127.0.0.1', 6379); $redis->auth('12345 ...
- LGP3703题解
不会数据结构石锤了/kk 题意清晰. 我们看到 \(1\) 操作比较奇怪,考虑从 \(1\) 操作入手. 设 \(f_u\) 为 \(u\) 到根节点一共有多少种颜色,我们使用树剖来维护这个东西. 考 ...
- Java Object 类常用方法总结
总结 public final native Class<?> getClass() //返回此 Object 运行时的类 public native int hashCode() //返 ...