SELECT without FROM clause
You can now run SELECT expression-only queries without a FROM clause, e.g. adding from dual
is no longer needed in such cases. The DUAL
table has not disappeared, all queries that use it will continue to work as expected.
select
2 * 3;
select
to_char(
sysdate,
'dd.mm.yyyy'
) as today;
select
sysdate;
Result
SQL> select
2 2 * 3;
2*3
----------
6
SQL> select
2 to_char(
3 sysdate,
4 'dd.mm.yyyy'
5 ) as today;
TODAY
----------
20.06.2023
SQL> select
2 sysdate;
SYSDATE
---------
20-JUN-23
Benefits
Making the from dual
clause optional in expression-only SQL statements improves SQL code portability and ease of use for developers.