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 ...
随机推荐
- 【C#表达式树 五】工厂模式创建表达式树节点
常量 1.值常量 (p)=>100+88+p ParameterExpression par = Expression.Parameter(typeof(int), "p" ...
- weblogic 升级bsu_Weblogic补丁升级之坑坑洼洼
转至:https://blog.csdn.net/weixin_30682635/article/details/111911952 [概述] 虽然当前国内去IOE波涛汹涌,但不可否认OracleWe ...
- AcWing 288. 休息时间
传送门 思路: 考虑DP,设dp[i][j][1]为牛在前小时休息j个小时且第i个小时休息时,回复的最多体力:dp[i][j][0]为牛在前小时休息j个小时且第i个小时没有休息时,回复的最多体力. 可 ...
- LeetCode-080-删除有序数组中的重复项 II
删除有序数组中的重复项 II 题目描述:给你一个有序数组 nums ,请你 原地 删除重复出现的元素,使每个元素 最多出现两次 ,返回删除后数组的新长度. 不要使用额外的数组空间,你必须在 原地 修改 ...
- 5分钟学会 gRPC
介绍 我猜测大部分长期使用 Java 的开发者应该较少会接触 gRPC,毕竟在 Java 圈子里大部分使用的还是 Dubbo/SpringClound 这两类服务框架. 我也是近段时间有机会从零开始重 ...
- SpringCloudConfig配置使用
目录 SpringCloudConfig 是什么 作用 1.创建Git仓库 2.创建配置中心服务端 创建项目 导入pom 开启@EnableConfigServer YML 测试 全部资源请求方式 3 ...
- LGP4141题解
乱 搞 做 法 仅供参考 不会神秘背包技巧怎么办?只会代数爆推怎么办? 发现这个像是一个计数背包然后每次阉割掉一个位置. 考虑做前缀后缀背包然后卷起来,因为考虑成 GF 就是在求 \(\sum_{j= ...
- vue中使用keepAlice的各种问题
项目需求:从项目列表页index,进入到列表的详情页detail,再从detail返回到index,需要缓存index的数据 在App.vue中的配置 <template> <div ...
- Mybatis传递参数的几种方式
使用Map传递 优点:直接在sql中取出key即可 缺点:适用于小项目,不符合大公司规范 对象传递参数 优点:符合标准规范 缺点:麻烦 3.只有一个基本类型参数的情况下,直接在sql中取中 4.多个参 ...
- 74CMS 3.0 任意文件删除漏洞
一. 启动环境 1.双击运行桌面phpstudy.exe软件 2.点击启动按钮,启动服务器环境 二.代码审计 1.双击启动桌面Seay源代码审计系统软件 2.因为74CMS3.0源代码编辑使用GBK编 ...