Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: What is the table "dual"
The table dual is a dummy table which has one row and one column and is used for selecting values from the database which has no real table attached to the statement.Since a SELECT statement should have a table attached to it you use dual to select something from. Eg: selecting from a sequence
Executing the following code SELECT SEQUENCE_NAME.NEXTVAL FROM DUAL;will return you the next value in the sequence
Hope this helps.
Casper Thrane <ct_at_benau.dk> wrote in article
<3472B8DF.3948EF42_at_benau.dk>...
> Hi!
>
> I have seen a sql-scripr that looks like this:
>
> select to_number (':FraMnd'||'01') StartDato from dual;
>
> what is "dual".
> --
> Casper Thrane
> Systemdeveloper
> Benau A/S
>
Received on Tue Dec 09 1997 - 00:00:00 CST