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

Home -> Community -> Usenet -> c.d.o.server -> Re: Table DUAL

Re: Table DUAL

From: Mark D Powell <markp7832_at_my-deja.com>
Date: 2000/04/15
Message-ID: <8daks3$v41$1@nnrp1.deja.com>#1/1

In article <8dahov$ruo$1_at_nnrp1.deja.com>,   icemelid_at_my-deja.com wrote:
>
>
> Hi Sir
>
> I know some simple uses of the DUAL table, like
>
> select 1+1 from dual
>
> Do you know some other uses about this table, if it
> is a table.
> Or could you tell me where to find some extra information.
>
> Thanks in advance.
>
>

The dual table can be used anywhere a one row table is necessary or useful such as in retriveing a function value into an appliation or for display in sqlplus:

The current Oracle user
select user from sys.dual;

The current date with or without time
select sysdate, to_char(sysdate,'MM/DD/YYYY HH24:MI:SS') from dual;

testing (or retrieving) column functions on a constant select my_func('test value') from dual;

Oracle internal operations also make use of the dual function.

--
Mark D. Powell  -- The only advice that counts is the advice that
 you follow so follow your own advice --


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Sat Apr 15 2000 - 00:00:00 CDT

Original text of this message

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