top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is use for dual table in oracle?

+1 vote
385 views

I need to know about the DUAL Table.Can anyone tell what is the use for ?

posted Aug 11, 2014 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

The DUAL table is a special one-row table present by default in all Oracle database installations. It is suitable for use in selecting a pseudocolumn such as SYSDATE or USER. The advantage to dual is the optimizer understands dual is a special one row, one column table -- when you use it in queries, it uses this knowledge when developing the plan.

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

DUAL is always there, every user can access it, and it always has the same contents. It is suitable for use in selecting a pseudo column such as SYSDATE or USER.

>select * from dual
DUMMY 
----- 
X 
answer Aug 12, 2014 by Salil Agrawal
...