| |
GeekInterview.com > Tech FAQs > Oracle
| Print | |
Question: Can you explain what is DUAL table in oracle ?
|
| July 07, 2008 08:56:15 |
#9 |
| lanka_satya |
Member Since: January 2008 Total Comments: 16 |
RE: Can you explain what is DUAL table in oracle ? |
most of our friends have given different answers for this..........infact most of them are same and correct .......but I will give one simple definition and small logic beyond its working.........? I can say it is a practise table as it contains only one column and one row...that is its column name is dummy and value is x...even though if try to insert any value also it will take,but will not be updated into the actual table.....
even we can create this type of table for ur own purpose......
second point which i have mentioned is:
we normally use this table for functions by using select stmt................ for example: let us type this.
select sysdate from dual; here the select statement works for every row in a table and its basic use is it will always try to retrive a value for the expression or column or function for which we have given in select statement and it works for each record..........
so normally it contains one row, so you will be displayed with one value that's if u can see we cannot test group functions with dual table..
if you have any doubts regarding functionality of dual table:
let try to write this query...
select sysdate from emp
this will try to display sysdate for the number of rows that is present in emp table......
so dual table creation is different and don't try to think of inserting any rows in it,because it won't take any as this is used for simple processing of select statement....
|
| |
Back To Question | |