Monday 7 August 2017

DUAL table in database

DUAL is a dummy table you can use to view results from functions and calculations.

The DUAL table is owned by the user SYS and can be accessed by all users. It contains one column, DUMMY, and one row with the value X.

The DUAL table is useful when you want to return a value once only, for instance, the value of a constant, pseudo column, or expression that is not derived from a table with user data.

The DUAL table is generally used for SELECT clause syntax completeness, because both SELECT and FROM clauses are mandatory, and several calculations do not need to select from actual tables. 

The use of the dual table allows you to enter your values in a select statement, although not being stored in table.

Syntax
DUAL 

Examples

No comments:

Post a Comment