How to write a table literal in Oracle?

Viewed 4551

A table with one column and one row can be created with:

select 'create' as col from dual;

This can be used to build table joins:

with
  a as (select 'create' as ac from dual),
  b as (select 'delete' as bc from dual)
select * from a left outer join b on (ac = bc);

Now I would like to have two rows. I did it in this way:

select 'create' as col from dual
union
select 'delete' as col from dual;

But is there a more compact notation for this? I tried

select ('create', 'delete') as col from dual;

but it does not work.

2 Answers
Related