MySQL5.7对sql语句强制使用索引查询时报错如下:

解决:这里的id字段是表的主键,查看别人的经验贴得知是语法错误,参考链接https://stackoverflow.com/questions/19205004/key-emp-no-doesnt-exist-in-table-employees ,当强制索引是主键时sql语句应这样写

mysql> SELECT COUNT(UA.id) AS tp_count FROM  ck_user_audit UA RIGHT JOIN ck_user AS U force index(PRIMARY) ON U.id = UA.uid LIMIT 1;

ERROR 1176 (42000): Key 'XXX' doesn't exist in table 'XXX'报错处理的更多相关文章

  1. create table xxx as select 与 create table xxx like

    create table xxx )       | NO   | PRI | NULL    | auto_increment | | Name       | varchar() | NO   | ...

  2. 报Error creating bean with name 'dataSource' defined in class path resource 报错解决办法

    在学习spring boot 的数据库操作的时候,报了一串错误 对于初学spring boot的我来说,英语水平低,看不懂报错的信息,给我造成了很大的麻烦,花了我一天的时间,经过不懈的努力后终于让我找 ...

  3. Error creating bean with name 'dataSource' defined in class path resource 报错解决办法

    在学习spring boot 的数据库操作的时候,报了一串错误

  4. 各种”xxx“ native gem required installed build tools 报错

    报错情况:(类似毛病 提示native gem require installed builld tools的解决方法是一样的)) 解决方法:http://rubyinstaller.org/down ...

  5. Xcode解决“Implicit declaration of function 'XXX' is invalid in C99” 警告或报错

    1.Build Setting>>>C Language Dialect,然后选择GNU99[-std=gnu99] (选择看项目实际要求). 2.Build Setting> ...

  6. Error starting mongod. /var/run/mongodb/mongod.pid exists.启动mongodb报错

    linux上安装mongodb,启动时报上面的错,解决如下: 解决方法: 1.删除mongod.pid文件 rm -rf /var/run/mongodb/mongod.pid 2.修改/tmp/mo ...

  7. FastCGI sent in stderr: "Access to the script 'XXX' has been denied (see security.limit_extensions)" 报错处理

    一个新Lnmp环境在调试项目时出现如下报错: 处理: 在php.ini中设置cgi.fix_pathinfo=1(默认为0),重新加载php即可.参考链接https://blog.csdn.net/u ...

  8. Error:java: Can‘t generate mapping method with primitive return type.报错

    原因:Spring项目中使用了JPA以及Mybatis–mapper文件注解引错包导致编译错误 解决: 错误:import org.mapstruct.Mapper;正确路径:import org.a ...

  9. 运行yum报错:Error: Cannot retrieve metalink for repository: epel. Please verify its path

    Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again 当我们安装第三方扩 ...

随机推荐

  1. 自动按键的Sendkeys工具的下载和使用

    大家好! 下面介绍一款自动按键的小工具:Sendkeys 下载地址 Sendkeys.rar 按键脚本的书写规则如下: 启动本工具后,在工具中打开一个脚本文件,然后在工具中按下Ctrl+A全选所有脚本 ...

  2. PID<->Port[转]

    //Netstat -anb #include <Windows.h> #include "Psapi.h" #include <Iprtrmib.h> # ...

  3. 5314跳跃游戏IV

    题目:给你一个整数数组 arr ,你一开始在数组的第一个元素处(下标为 0).每一步,你可以从下标 i 跳到下标:    i + 1 满足:i + 1 < arr.length    i - 1 ...

  4. C#.NET中的ToString()数字格式化

    数字格式字符串-----货币-----.ToString("C");.ToString("c");例 2.5.ToString("c") - ...

  5. H - Mr. Panda and Birthday Song Gym - 101775H (动态规划)

    Mrs. Panda’s birthday is coming. Mr. Panda wants to compose a song as gift for her birthday. It is k ...

  6. Java线程池面试

    New Thread的弊端 每次new Thread会新建对象,性能差 线程缺乏统一管理,可能无限制的新建线程,相互竞争,有可能占用过多系统资源导致死机或OOM 缺少更多功能,如更多执行.定期执行.线 ...

  7. 缩写: i = i + 1 和 i += 1,可以看做是 i 自加的值 是1。

    i +=  1; 这样有助于记忆: i自加的值等于1

  8. [USACO09DEC]雪橇Bobsledding(贪心)

    https://www.luogu.org/problem/P2968 题目描述 Bessie has entered a bobsled competition because she hopes ...

  9. Linux基础篇一:Linux历史

    记得有个GNU组织,里面有个GPL协议(通用版权许可协议),如果软件被打上GPL,那么任何人都可以对这个软件进行修改.

  10. 00 - 准备 Anaconda 环境

    Anaconda 环境 官方下载安装包:https://www.anaconda.com/download/ Anaconda Navigtor :用于管理工具包和环境的图形用户界面,后续涉及的众多管 ...