Friday, 10 March 2017

What is DUAL table in Oracle ?

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 to be 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. Because DUAL has only one row, the constant is returned only once. Alternatively, you can select a constant, pseudocolumn, or expression from any table, but the value will be returned as many times as there are rows in the table.

The various operations which can be done using DUAL.

1. SYSDATE
2. Calculations
3. Basic Oracle functions etc..

Examples :-


System Date :- 

Calculations :- 



Oracle Function i.e. Length :- 



No comments:

Post a Comment