![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
ivy2016
这个作者很懒,什么都没留下…
展开
-
mysql 查询3天之内的数据
SELECT * FROM Session where createTime >= now()-interval 3 day;原创 2016-10-19 15:13:30 · 5642 阅读 · 4 评论 -
查询匹配度
产品智能推介。找匹配度最高的记录。 select * from(select id,org_id,sum( (case when instr(product_type,'2')>0 then 1 else 0 end) +(case when interest>5 and interest<11 then 1 else 0 end) +(cas...原创 2016-11-10 10:49:10 · 399 阅读 · 0 评论 -
事务中的锁,行锁与表锁
当执行事务时,相当于执行了锁,来保持数据的一致性,但是锁分多种,有行锁,表锁。行锁就是只锁定那一行,那一条记录,别的连接下的操作还可以操作这张表。表锁就是锁定整张表,只有当前连接执行完事务,才可以解锁。 就效率而然,当然是行锁好,适用与多线程和高并发的情况,不过行锁对数据库会带来额外的开销。表锁高并发就差一点了,但单个的话快一点。 以mysql为例,有索引并且使用了该索引当条件的...原创 2017-09-08 16:11:25 · 296 阅读 · 0 评论 -
mysql 报错解决 sql_mode=only_full_group_by
ql语句报错问题#1055 - Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘cash.sdb_login_log.id‘ which is not functionally dependent on columns in GROUP BY clause; t...原创 2017-11-22 14:15:33 · 196 阅读 · 0 评论