GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle
Go To First  |  Previous Question  |  Next Question 
 Oracle  |  Question 17 of 81    Print  
Can you explain What is DUAL table in Oracle?

  
Total Answers and Comments: 3 Last Update: June 11, 2008     Asked by: Sundra 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
April 04, 2006 06:47:01   #1  
mayad Member Since: April 2006   Contribution: 1    

answer......of... What is DUAL table in Oracle?
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

 
Is this answer useful? Yes | No
April 19, 2006 15:12:29   #2  
parthokonar Member Since: April 2006   Contribution: 3    

RE: Can you explain What is DUAL table in Oracle?

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.


 
Is this answer useful? Yes | No
June 11, 2008 06:20:13   #3  
ashish88 Member Since: June 2008   Contribution: 8    

RE: Can you explain What is DUAL table in Oracle?

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


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape