有没有办法让MySQL查询得到与Oracle的
相同的结果 WITH t(n) AS
(
SELECT 1
FROM DUAL
UNION ALL
SELECT n+1 FROM t WHERE n < 5
)
SELECT * FROM t;
or
select level
from dual
connect by level < 100
以下是我在MySQL SQL中的想法
select *
from
(select @level := ifnull(@level,1) +1 as prev
)a
where a.prev < 100;
但子查询不会动态执行