MySQL 查询一串连续字符串
程序员文章站
2022-03-03 17:07:06
...
参考:https://blog.csdn.net/qiuli_liu/article/details/81707562
SELECT
@xi := @xi + 1 AS xc
FROM
( SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 ) xc1,
( SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5 ) xc2,
( SELECT @xi := 0 ) xc0