add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
create table t as select 'a' as a, 'b' as b from dual
1 rows affected
with singlexml(xmlcol) as (
select xmltype(nvl(
dbms_xmlgen.getxml('select * from ' || (
select case count(*) when 0 then 'dual where 0=1' else max(t.table_name) end
from all_tables t
where t.table_name = 'T' -- change to X for testing nonexistent table
))
, '<?xml version="1.0"?><ROWSET/>'
))
from dual
)
select cols.a
, cols.b
from singlexml
, xmltable('/ROWSET/ROW'
passing singlexml.xmlcol
columns a varchar2(32) path 'A'
, b varchar2(32) path 'B'
) cols

A B
a b