我试图这样做,但它返回的是列而不是行
选择386,417,420,421,422,423 ……来自双
试试这个:
select column_value col1 from table(sys.odcinumberlist((386) ,(417),(420),(421),(422),(423)))
您可以使用 UNION 要么 UNION ALL 作为获得所需输出的工作。
UNION
UNION ALL
SELECT 386 from dual UNION ALL SELECT 417 from dual UNION ALL SELECT 420 from dual ...
使用 union all
union all
SELECT 386 from dual union all SELECT 417 from dual union all SELECT 420 from dual union all SELECT 386 from dual