![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据库异常问题
咸鱼巴巴_888
这个作者很懒,什么都没留下…
展开
-
mysql在插入中文和空格时 text数据类型报mysql incorrect string value .....错误!
最近在做项目的时候,遇到这么一个错误,数据库报错,提示是mysql incorrect string value .....。我猜想肯定是数据库的某个字段text数据类型在插入数据时报错了。实际的业务是这样的:这个字段是text字段,在后台添加的,有文本编辑器,主要内容时新闻文章之类的。但是,我在网上复制新闻粘贴进来是不会报错的,手动打字打空格就会报错。解决办法:修改mysql数据库,text原创 2017-08-23 14:07:36 · 3097 阅读 · 0 评论 -
mysql查询某表中相同数据并删除,遇到错误: You can't specify target table 'app_user' for update in FROM clause
首先我先查询出用户表中相同的数据,sql是:select phone from app_user where phone is not null Group By phone Having Count(*)>1然后我要删除这些相同的数据,于是我这样写:delete from app_user where phone in( select phone from app_user w...原创 2018-10-09 09:25:50 · 192 阅读 · 0 评论