Oracle's SQL syntax requires the FROM clause but some queries don't require any tables - DUAL can be used in these cases.
Charles Weiss explains why he created DUAL:
I created the DUAL table as an underlying object in the Oracle Data Dictionary. It was never meant to be seen itself, but instead used inside a view that was expected to be queried. The idea was that you could do a JOIN to the DUAL table and create two rows in the result for every one row in your table. Then, by using GROUP BY, the resulting join could be summarized to show the amount of storage for the DATA extent and for the INDEX extent(s). The name, DUAL, seemed apt for the process of creating a pair of rows from just one.1
Beginning with 10g Release 1, Oracle no longer performs physical or logical I/O on the DUAL table, though the table still exists.2
DUAL is readily available for all authorized users in a SQL database.
Several other databases (including Microsoft SQL Server, MySQL, PostgreSQL, SQLite, and Teradata) enable one to omit the FROM clause entirely if no table is needed. This avoids the need for any dummy table.
"More About Oracle's History". Oracle Magazine. January–February 2002. Archived from the original on December 5, 2004. Retrieved 4 September 2013. https://web.archive.org/web/20041205061859/http://www.oracle.com/technology/oramag/oracle/02-jan/o12sendmail.html ↩
Oracle Database SQL Language Reference 11g Release 2 (11.2), Selecting from the DUAL Table https://docs.oracle.com/cd/E11882_01/server.112/e41084/queries009.htm#SQLRF20036 ↩
DB2 10.1 InfoCenter :: DB2 Version 10.1 for Linux, UNIX, and Windows - DUAL table http://publib.boulder.ibm.com/infocenter/db2luw/v10r1/topic/com.ibm.db2.luw.apdv.porting.doc/doc/r0052874.html ↩
Informix 12.10 InfoCenter :: Administrator's Reference :: The sysmaster database :: The System-Monitoring Interface Tables :: sysdual https://www.ibm.com/support/knowledgecenter/SSGU8G_12.1.0/com.ibm.adref.doc/ids_adr_0225.htm ↩
What is the Oracle equivalent of “Dual” table in SqlServer? https://stackoverflow.com/questions/28371342/what-is-the-oracle-equivalent-of-dual-table-in-sqlserver ↩
"MySQL :: MySQL 5.0 Reference Manual :: 13.2.8 SELECT Syntax". Archived from the original on 2012-01-03. Retrieved 2009-03-14. https://web.archive.org/web/20120103180754/http://dev.mysql.com/doc/refman/5.0/en/select.html ↩
PostgreSQL :: PostgreSQL Wiki :: Oracle to Postgres Conversion http://wiki.postgresql.org/wiki/Oracle_to_Postgres_Conversion#The_Dual_Table ↩
"DUAL". www.vertica.com. Retrieved 2022-03-10. https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/SystemTables/CATALOG/DUAL.htm ↩