DUAL, when you really come down to it, is really just a table into which Oracle defaults with just a single record. However, because it is just a simple table, additional records can be inserted into it, as you have just discovered.
Log in as SYStem and delete all but one records from dual.
Because there is no guarantee that DUAL will always return exactly one record, I tend to select from USER_USERS when I really want to have exactly one record coming back to me.
...Rudy
-- --Original Message-- -- From: oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)] On Behalf Of Frank B Hansen Sent: Tuesday, November 08, 2005 5:26 AM To: ORACLE-L Cc: frank.hansen@(protected) Subject: Select from dual return 3 rows !
Hi List
On a 9.2.0.1.0 database I get the following result:
system@(protected)> select * from dual; D - X X X
No matter what I select from dual, I get 3 rows. Anyone seen this behaviour ?
Thanks, Frank
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD><TITLE>Message</TITLE> <META http-equiv=Content-Type content="text/html; charset=us-ascii"> <META content="MSHTML 6.00.2800.1479" name=GENERATOR></HEAD> <BODY> <DIV><SPAN class=509160818-08112005><FONT face=Arial color=#0000ff size=2>DUAL, when you really come down to it, is really just a table into which Oracle defaults with just a single record. However, because it is just a simple table, additional records can be inserted into it, as you have just discovered.</FONT></SPAN></DIV> <DIV><SPAN class=509160818-08112005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=509160818-08112005><FONT face=Arial color=#0000ff size=2>Log in as SYStem and delete all but one records from dual.</FONT></SPAN></DIV> <DIV><SPAN class=509160818-08112005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=509160818-08112005><FONT face=Arial color=#0000ff size=2>Because there is no guarantee that DUAL will always return exactly one record, I tend to select from USER_USERS when I really want to have exactly one record coming back to me.</FONT></SPAN></DIV> <DIV><SPAN class=509160818-08112005><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV> <DIV><SPAN class=509160818-08112005><FONT face=Arial color=#0000ff size=2>...Rudy</FONT></SPAN></DIV> <DIV><SPAN class=509160818-08112005></SPAN> </DIV> <BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"> <DIV></DIV> <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT face=Tahoma size=2>-- --Original Message-- --<BR><B>From:</B> oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)] <B>On Behalf Of </B>Frank B Hansen<BR><B>Sent:</B> Tuesday, November 08, 2005 5:26 AM<BR><B>To:</B> ORACLE-L<BR><B>Cc:</B> frank.hansen@(protected)<BR><B>Subject:</B> Select from dual return 3 rows !<BR><BR></FONT></DIV> <DIV> <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"> <BLOCKQUOTE dir=ltr style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT : #000000 2px solid; MARGIN-RIGHT: 0px"> <DIV>Hi List</DIV> <DIV> </DIV> <DIV>On a 9.2.0.1.0 database I get the following result:</DIV> <DIV> </DIV> <DIV><A href="mailto:system@(protected)">system@(protected)</A>> select * from dual;</DIV> <DIV>D<BR>-<BR>X<BR>X<BR>X<BR></DIV> <DIV>No matter what I select from dual, I get 3 rows. Anyone seen this behaviour ?</DIV> <DIV> </DIV> <DIV>Thanks, Frank</DIV> <DIV> </DIV> <DIV> </DIV></BLOCKQUOTE></BLOCKQUOTE></DIV></BLOCKQUOTE></BODY>< /HTML>