各位老师:如下sql语句该怎么写?a,b,c,d,e代表不等长的字符串?_百度知 ...
发布网友
发布时间:2024-10-08 15:16
我来回答
共1个回答
热心网友
时间:2024-10-08 16:59
设表名是f,列名是x:
select x1+','+x2++','+x3+','+x4+','+x5 from
(select f1.x as x1, f2.x as x2, f3.x as x3, f4.x as x4, f5.x as x5 from f as f1
join f as f2 on f2.x < f1.x join f as f3 on f3.x < f2.x join f as f4 on f4.x < f3.x join f as f5 on f5.x < f4.x ) as ff