12 2024 档案

摘要:-- oracle分组排序取出每组顺序第一条 select * from ( select row_number() over(partition by user_code order by create_time desc) rn, t.* from your_table t ) where rn 阅读全文
posted @ 2024-12-17 14:14 一隅桥畔 阅读(114) 评论(0) 推荐(0) 编辑
摘要:package com.lbdz.common.utils; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.regex.Mat 阅读全文
posted @ 2024-12-10 11:37 一隅桥畔 阅读(13) 评论(0) 推荐(0) 编辑
摘要:-- oracle 列转行逗号分隔 select year, listagg(sales_amount, ',') within group (order by sales_amount) as sales_amounts from sales_data group by year 阅读全文
posted @ 2024-12-05 14:06 一隅桥畔 阅读(38) 评论(0) 推荐(0) 编辑
摘要:-- 列转行拼接 select stuff((select ','+字段名 from 表名 for xml path('')),1,1,'') -- 示例 select stuff((select ','+user_name from t_user for xml path('')),1,1,'') 阅读全文
posted @ 2024-12-05 14:05 一隅桥畔 阅读(8) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示