![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
耳东的慢生活
这个作者很懒,什么都没留下…
展开
-
mybatis 使用concat 模糊查询
concat() 函数用于将多个字符串拼接成一个字符串 本举例:keyWord为空查询所有,keyWord不为空,检索所有contact中所有字段匹配的内容。 注意:所有字段需要IFNULL判断,否则某字段为空可能会导致查询结果丢失一条记录 ...原创 2020-07-29 09:34:52 · 2704 阅读 · 0 评论 -
workbench :safe update mode and you tried to update a table without a WHERE that uses a KEY column
#workbench报错:You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column#解决:打开Workbench的菜单[Edit]->[Preferences...]切换到[SQL Editor]页面把[Forbid UPDATE and DELE...原创 2018-05-07 14:36:45 · 487 阅读 · 0 评论 -
Workbench : lost connection to mysql during query
MySQL Workbench对大表执行复杂操作时报错如下:Error Code: 2013. Lost connection to MySQL server during query解决办法:Edit->Preference->SQL Editor将下图DBMS connection read time out(in seconds)适当调大根据自己测试:240可以承受万条插入。...原创 2018-05-21 13:35:06 · 1321 阅读 · 0 评论 -
mysql : You can't specify target table '表名' for update in FROM clause...
#delete的时候用in的话子查询需要使用临时表,要不然会报错:You can't specify target table '表名' for update in FROM clause...原创 2018-05-21 13:41:24 · 105 阅读 · 0 评论 -
NOT IN 无效
select * from A where id not in (一堆具体的值);我遇到的情况是查询出A表的所有内容,not in 没有效果解决方案:我的做法是将not in 后面的值存到一张临时表B中,select * from A where id not in (select id from B)...原创 2018-06-26 16:20:18 · 859 阅读 · 0 评论 -
解决win10下MySQL 5.7.22登录Access denied for user 'root'@'localhost' (using password: YES)的问题
这是一个漫长曲折的过程,网上资料查了不少,大都不适合,写一下,希望后来者少遇到坑。。 1.首先停mysql服务,进入到mysql安装bin目录下,net stop mysql;也可以直接任务管理器-->服务-->右击停止(因为公司限制,没有administrator权限,谁敢相信这一步都如此蛋疼) 2.打开第一个cmd1窗口,切换到mysql的bin目录,运行命令:mysql...原创 2018-07-25 16:41:10 · 2535 阅读 · 6 评论