How can I create the following table in Oracle.
+------+------+
| col1 | col2 |
+------+------+
| A | 1 |
| B | 2 |
+------+------+
I need it as an itermediate table in a WITH-clause.
How can I create the following table in Oracle.
+------+------+
| col1 | col2 |
+------+------+
| A | 1 |
| B | 2 |
+------+------+
I need it as an itermediate table in a WITH-clause.
Please use below query,
with tbl as
(
select 'A' as col1, 1 as col2 from dual
UNION
select 'B' as col1, 2 as col2 from dual
)
select * from tbl;
You can use:
You can then use
t
throughout the rest of the query.