Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.3K Intelligent Advisor
- 62 Insurance
- 536.1K On-Premises Infrastructure
- 138.2K Analytics Software
- 38.6K Application Development Software
- 5.7K Cloud Platform
- 109.4K Database Software
- 17.5K Enterprise Manager
- 8.8K Hardware
- 71.1K Infrastructure Software
- 105.2K Integration
- 41.6K Security Software
SELECT SQL expression without FROM clause

To select values from SQL expressions, a FROM clause is not strictly required as the expression is not selected from that table anyway.
For example:
SELECT sysdate;
SELECT 1+2;
SELECT my_fuction();
Oracle uses the FROM dual construct as a workaround for that scenario where dual is a dummy one-column, one-row table, translating the above to:
SELECT sysdate FROM dual;
SELECT 1_2 FROM dual;
SELECT my_function() FROM DUAL;
Although the SQL standard doesn't allow a SELECT statement without a FROM clause, pretty much every other database does support the construct of selecting and expression without a FROM clause. Especially for beginners, users coming from other databases and quick tests, not having to know of and type FROM dual all the time aids user-friendliness.