| |
GeekInterview.com > Interview Questions > Oracle > Scenarios
| Print | |
Question: Dual table explain. Is any data internally storing in dual table. Lot of users are accessing select sysdate from dual and they getting some millisecond differences. If we execute SELECT SYSDATE FROM EMP; what error will we get. Why
|
| August 08, 2009 08:03:08 |
#7 |
| rajesh_bu2001 |
Member Since: August 2009 Total Comments: 2 |
RE: Dual table explain. Is any data internally storing in dual table. Lot of users are accessing select sysdate from dual and they getting some millisecond differences. If we execute SELECT SYSDATE FROM EMP; what error will we get. Why |
Dual is a single row table in the system tablespace accessible to all the schema users. Selecting from the DUAL table is useful for computing a constant expression with the SELECT statement. Because DUAL has only one row, the constant is returned only once. Now if we fire sql> select sysdate from emp;
SYSDATE ---------- 24/08/2009 24/08/2009 24/08/2009
It will show sysdate as many times as there are no of rows in the table. It wont throw any row. Thats why there is a dual table in Oracle for such kind of Selects.
Keep Smilin... Rajesh
|
| |
Back To Question | |