Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Table DUAL
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