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#基础概念】函数参数默认值和指定传参和方法参数
函数参数默认值和指定传参 最近在编写代码时发现介绍C#参数默认值不能像PL/SQL那样直接设置default,网上也没有太多详细的资料,自己琢磨并试验后整理成果如下: C#允许在函数声明部分定义默认值 ...
- 在win10操作系统中pycharm启动时无法打开的解决方法
''' 当打开pycharm时报错 Error launching Pycharm Failed to load JVM DLL C:\Program Files\Jetbrains\Pycharm ...
- python+selenium+pycharm使用
上一章节讲了安装python及selenium,该章节讲解下使用pycharm编辑器进行代码编写 下载地址:http://www.jetbrains.com/pycharm/download/#sec ...
- quartz框架(七)-JobStore
JobStore 在之前的博文中,博主已经写了关于Job的相关内容.本篇博文,博主将介绍JobStore相关的内容. JobStore是存放Job和Trigger的地方.当我们调用Scheduler对 ...
- Casbin入选2022 Google编程之夏
Casbin入选2022 Google编程之夏! Google编程之夏(Google Summer of Code,GSoC),是由Google公司所主办的年度开源程序设计项目,第一届从2005年开始 ...
- vue3-插槽作用域的使用
当我们在父组件定义了一个数组, data() { return { name: ["lkx", "msx"] } } 想把它传到子组件处理后 props: { ...
- 前端—我的第一篇博客 梦开始的地方(面向对象版tab栏)
这是我的第一篇博客 博客生涯才开始 但是人生已经过去了二十个年头了 才开始弄这个 也没搞得太懂 我原本的想法是想搞个源代码上来 但是看了半天好像就只能传html源代码 那我还有css js的部分呢 我 ...
- python 矩阵顺时针旋转90度
# 4*4矩阵旋转90度 def matrix_transposition(data): for index,row in enumerate(data): for col in range(inde ...
- jdbc model 代码示例
package com.gylhaut.model; import java.util.Date; public class Goddess { @Override public String toS ...
- c++-投骰子
#include<iostream>#include<cstdlib>//产生随机数的函数using namespace std;enum GameStatus{WIN,LOS ...