![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
Kevin_ _
把生活记录下来
展开
-
根据根据子id查询所有的父id,根据父id 递归查询所有下级,
https://yq.aliyun.com/articles/48885原创 2017-06-28 23:13:36 · 1790 阅读 · 0 评论 -
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
报错信息如下:2017-06-28 10:28:39,191 ERROR DruidDataSource:1188 - discard connectioncom.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failureThe last packet successfully received原创 2017-06-28 10:46:21 · 595 阅读 · 0 评论 -
Sql 查询重复记录中最新的数据
比如 log表中有字段 id , appid , create_time每个服务可能出现多条记录。如果要查询我查询每个appid 最新的数据SELECT *FROM log aWHERE NOT EXISTS ( SELECT 1 FROM log WHERE appid = a.appid AND create_time > a.c...原创 2018-10-17 19:20:34 · 4890 阅读 · 1 评论 -
left join
order 表公众号表order left jon pub:pub left join order :原创 2018-10-17 19:45:29 · 138 阅读 · 0 评论