全部评论
窗口函数了解一下😳
分享
用 row num() 吧
分享
联易融
官网直投
同意二楼,先用窗口函数row_number进行排序,再进行字段之间的连接 select concat_ws('-',a1.Id,a1.row_number) as Id, a1.Name from (select Id,Name, row_number() over (partition by Id) as row_number from a where Id <= 201)) a1 union all select Id,Name from a where Id >= 201 如果有更简单的方法请指教哈~
分享
相关推荐
投递58到家等公司7个岗位 >
点赞 评论 收藏
转发
点赞 评论 收藏
转发