DUAL table in Oracle

Can you explain What is DUAL table in Oracle?

Questions by Sundra

Showing Answers 1 - 3 of 3 Answers

mayad

  • Apr 4th, 2006
 

dual is a table which is created by oracle along with the data dictionary. It consists of exactly one column whose name is dummy and one record. The value of that record is X.
The owner of dual is SYS but dual can be accessed by every user.
As dual contains exactly one row (unless someone fiddled with it), it is guaranteed to return exactly one row in select statements if a constant expression is selected against dual, such as in:
select sysdate from dual
Although it is possible to delete the one record, or insert additional records

  Was this answer useful?  Yes

Hi,

Actually what happens when we issue create database command, Oracle automatically creates the tablespace and tables using the sql.bsq script found in the $oracle_home/rdbms/admin directory this scripts the dual table and is owned by the sys and has one column and one row.

  Was this answer useful?  Yes

hello
 
dual is a table which is created by oracle along with the data dictionary.
It consists of exactly one column whose name is dummy and one record.
The value of that record is X.

sql> desc dual
Name                    Null?    Type
----------------------- -------- ----------------
DUMMY                            VARCHAR2(1)

sql> select * from dual;

D
-
X

The owner of dual is SYS but dual can be accessed by every user.
As dual contains exactly one row (unless someone fiddled with it),
it is guaranteed to return exactly one row in select statements if a
constant expression selected against dual, such as in:

select sysdate from dual

Although it is possible to delete the one record, or insert additional records,
one really should not do that!.

thnaks
Ashish Sharma

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions