Is it possible to have multiple rows with SELECT FROM DUAL?

  • A+
Category:Languages

Can I have something like

SELECT (1, 2, 4542, 342) FROM DUAL; 

and get it like this?

  |  1    |   |  2    |   |  4542 |   |  342  | 


Well if (1, 2, 4542, 342) were a string you could do this:

with cte as (     SELECT '1, 2, 4542, 342' as str      FROM DUAL ) select regexp_substr(str,'[^,]+',1,level)  from cte connect by level <= regexp_count(str, ',')+1 / 

Comment

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: