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

Home -> Community -> Usenet -> c.d.o.misc -> Re: What is the table "dual"

Re: What is the table "dual"

From: Ken Leighton <leighton_at_unixg.ubc.ca>
Date: 1997/11/25
Message-ID: <347B2AB0.8AC597FC@unixg.ubc.ca>#1/1

From the Oracle 7 SQL Server Reference (page 4-435):

DUAL is a table automatically created by Oracle along with the data dictionary. DUAL is in the schema of the user SYS, but is accessible by the name DUAL to all users. It has one column, DUMMY, defined to be VARCHAR2(1), and contains one row with a value of 'X'. Selecting from the DUAL table is useful for computing a constant expression with the SELECT command. Because DUAL has only one row, the constant is only returned once. Alternatively, you can select a constant, pseudocolumn, or expression from any table.

The following statement returns the current date:

SELECT SYSDATE FROM DUAL Casper Thrane wrote:

> 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

--
Ken Leighton
Manager, Information Systems Development
Purchasing Department
The University of British Columbia

Telephone: (604)822-8302   Fax: (604)822-6949
Email: leighton_at_unixg.ubc.ca

"The paperless office is about as likely as the paperless bathroom."
Received on Tue Nov 25 1997 - 00:00:00 CST

Original text of this message

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