Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: What is "dual"?

Re: What is "dual"?

From: Thorsten Kettner <thorsten_kettner_at_my-deja.com>
Date: Tue, 16 Jan 2001 08:28:43 GMT
Message-ID: <9410no$5jr$1@nnrp1.deja.com>

Well Chris, you have got some rather complicated answers, so I try to give you a more simple one:

DUAL is a table with just one row. It is made for SQL access. You see, in PL/SQL you have a lot of commands to deal with data, but in SQL you have not. If you want to get the sytem date for example there is no SQL command like "GIVE SYSDATE". The only command to get data is "SELECT" and this command needs a table and will give you rows of data. As you want just one single field that is not stored in a table, you use the dummy table DUAL:

SELECT SYSDATE FROM DUAL; Oops, is this explanation more simple than the others? Sometimes it is hard to explain even simple things...



In article <93qnhc$873$1_at_nnrp1.deja.com>,   chriss_at_enteract.com wrote:
> I am learning PL/SQL and have looked through two books, google
> searched, and 10 pages of DEJA and haven't found a good explanation...
>
> My book gives the example:
> SELECT 'COLUMBUS'
> INTO v_city
> FROM dual;
>
> There is no "dual" table though, so I'm curious just what this is. I
> would think it would be "FROM zipcode" which is the table that
 contains
> the city information.
>
> Insight appreciated. Thanks!
>
> Sent via Deja.com
> http://www.deja.com/
>

Sent via Deja.com
http://www.deja.com/ Received on Tue Jan 16 2001 - 02:28:43 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US