Oracle SQL - Select DUAL Table

Introduction

Oracle DBMS supplies a standard dummy table, named DUAL.

Oracle DBMs treats the use of DUAL like a function call that simply evaluates the expression used in the column list.

The following code shows two examples of DUAL table usage.

The contents of this DUAL table are totally irrelevant.

Demo

SQL>
SQL> select 123 * 456 from dual;

  123*456--   w w  w  .jav a  2 s . com
---------
 56088.00

SQL>
SQL> select sysdate from dual;

SYSDATE
---------
14-APR-18

SQL>
SQL>

The second query shows an example of using the system date.

You can refer to the system date in Oracle with the keyword SYSDATE.

SYSDATE is a function that returns the system date.

These functions are also referred to as pseudo columns.