DUAL table has structure as
DUMMY varchar2(1)
so how it is diplaying strings of length more than 1 (like SELECT '12345' from DUAL;) ?
[b]Question asked by visitor Niloy Chaudhury[/b]
Printable View
DUAL table has structure as
DUMMY varchar2(1)
so how it is diplaying strings of length more than 1 (like SELECT '12345' from DUAL;) ?
[b]Question asked by visitor Niloy Chaudhury[/b]
you need to understand that you can also have literals in your select clause. Actually '12345' is a literal not a column value.
For instance in the following query displays the current server date,
select sysdate from dual;
you can display sysdate by using other tables
select sysdate from employees;
But the above query is going have as many records in the table. For example if the employee table has 10 records then the later query display sysdate 10 times. This is what the use of DUAL table.
Dual is a special table which is availabe in all the schemas by default and user can execute any perdefined or user defined function on this table including any arithmetic operations.