![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql優化
二叉樹
这个作者很懒,什么都没留下…
展开
-
行鎖、、、、
mysql 如何判断SQL语句触发的行锁还是表锁? - 走看看转载 2022-06-17 14:54:58 · 44 阅读 · 0 评论 -
update 批量修改(根據不同id,修改不同的值)
<update id="batchUpdateRestaurantExt" parameterType="com.gingersoft.common.entity.RestaurantExt"> update t_restaurant <set> <trim prefix="restaurant_id = case" suffix="end,"> <foreach collection="list" item=原创 2020-10-10 18:50:03 · 2359 阅读 · 0 评论 -
數據庫表存在(主鍵id,或唯一索引)時,(主鍵id,或唯一索引)存在則修改數據,不存在則插入
數據庫表存在key(id)時,key存在則修改數據,不存在則插入insert into p_ipadloaduser(id,userId,restaurantId)values(#{id},#{userId},#{restaurantId})ON DUPLICATE KEY UPDATE userId=values(userId),restaurantId=values(restaurantId)原创 2020-09-16 16:43:25 · 60 阅读 · 0 评论