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
RE: Dual table explain. Is any data internally storing in dual table. Lot of users are accessing select ...
select * from dual;output will be:DUMMYXIt has a field called DUMMY with a value X.When you run select sysdate from emp;You will not get any error. You will get system in all rows (as number of rows in emp table).
RE: Dual table explain. Is any data internally storing...
The output wont be same .Ideally dual has single row so when selecting sysydate you will get one row which is not the case in emp which has multiple row .
RE: Dual table explain. Is any data internally storing...
The built-in function SYSDATE returns a DATE value containing the current date and time on your system. DUAL is built-in relation in Oracle which serves as a dummy relation to put in the FROM clause when nothing else is appropriate. For example try select 1+2 from dual; .So select sysdate from EMP won't generate the desired result.
RE: Dual table explain. Is any data internally storing...
We won t get any error if we select sysdate from emp table.the system date will be displayed for each row of the emp table. but if will select sysdate from dual. asingle row in which system date will be displayed
RE: Dual table explain. Is any data internally storing...
You can issue sysdate from any table but the result will be as many rows as your table that you used.
The whole idea behind using DUAL table is to meet the the criteria as defined by RDBMS that you have to use Select.. from syntax to get the values from column.
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;
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.