database
文章平均质量分 72
小崔Bro
亲爱滴访客你好,看看博客,提提建议吧,十分感谢。
展开
-
mysql解析json/数组
mysql在5.7开始支持json解析了 也可以解析数组哦!直接上demo: SELECT Substr(col, 2, Length(col) - 2), Length(col) FROM (SELECT Json_extract(Json_extract(Json_extract(state, "$.tpl"),"$.items" ), "$[0].url") AS col FROM page ORDER BY id DESC .转载 2021-01-26 17:32:05 · 4121 阅读 · 0 评论 -
mysql 查询 不支持区分大小写的解决办法
创建字段时添加binary参数 比如 varchar(200) binary查询字段时添加binary参数 比如 where binary hetonghao=#{hetonghao}原创 2017-07-21 17:18:40 · 615 阅读 · 0 评论 -
MySQL按照汉语拼音排序结果
order by convert(clbwname using gbk) ASC原创 2017-10-16 16:07:38 · 1124 阅读 · 0 评论 -
MyBatis中#{}和${}的不同和${}的妙用
MyBatis中#{}和${}的不同和${}的妙用标签: mybatis2017-04-14 20:54 2966人阅读 评论(1) 收藏 举报 分类:MyBatis(13) 版权声明:本文为博主原创文章,未经博主允许不得转载。目录(?)[+]突然意识到sql语句的独特语义要和代码分离,我们转载 2018-01-12 15:14:28 · 2928 阅读 · 2 评论 -
Mybatis 动态动态插入更新数据
Mybatis 动态动态插入更新数据,在字段名不确定的情况下。因为表字段也是动态创建的,所以字段名也是动态的。插入:1.将字段名封装为一个list2.将字段值封装为一个list3.将这两个list存储进一个Map中4.Mybatis xml文件配置: insert into table ${item} v原创 2018-01-18 11:41:02 · 3145 阅读 · 2 评论 -
[MySql]You can't specify target table for update in FROM clause 问题解决
原来SQL:DELETE FROM table WHERE id not in( SELECT id from table GROUP BY size)修改后SQL:DELETE FROM table WHERE id not in( SELECT resultset.id FROM (SELECT id from table原创 2018-01-10 15:44:46 · 2418 阅读 · 1 评论 -
springcache:spring-boot-starter-data-redis 中注解的使用:
首先,application使用@EnableCaching注解。@EnableCaching@SpringBootApplicationpublic class GatheringApplication { public static void main(String[] args) { SpringApplication.run(GatheringApplication.cl...原创 2019-07-02 17:05:56 · 875 阅读 · 0 评论