1 -> 1
2 -> 1.2
3 -> 1.2.3
4 -> 1.2.3.4
할 방법이 있을까요?
SELECT v , SUBSTRING(r, 2, 99) r FROM (SELECT v , @r := CONCAT(@r, '.', v) AS r FROM (SELECT 1 v UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 ORDER BY v ) a , (SELECT @r := '') b ) c ;