- DUAL is a table automatically created by Oracle Database along with the data dictionary.
- DUAL is in the schema of the user SYS but is accessible by the name DUAL to all users.
- It has one column, “DUMMY”, defined as VARCHAR2(1), and contains one row with a value “X”. Selecting from the DUAL table is useful for computing a constant expression with the SELECT statement.
SELECT 1 + 2 as res FROM DUAL;
SELECT 2*2/2 + 2*2 - 2 as res FROM DUAL;
SELECT 2*2/(2+2)*2 - 2 as res FROM DUAL;