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: What is "dual"

Re: What is "dual"

From: Thomas Griffin <tgriffin_at_qualitech.com>
Date: 1997/02/03
Message-ID: <32F663C3.62C@qualitech.com>#1/1

Mirwais Qader wrote:
>
> Something that has always puzzled me is what is "dual"?
>
> I know (at least I think I do) it is a table of 1 row and 1 col, but
> how is it used and what benefit is it?
>
> Thanks for any info.
> PS. Please respond by email.
>
> -Mir.

If you are writing a pl/sql block and you need the system time in a variable, the easiest way is to:

 	select sysdate
	  into :variable
	  from dual;

Since it has one row, it only returns the sysdate once. You can use this to many things, such as sequence numbers and current user.
-- 
Thomas Griffin
Project Leader
QUALITECH Systems, Inc.
tgriffin_at_qualitech.com
Received on Mon Feb 03 1997 - 00:00:00 CST

Original text of this message

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