Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Select from dual return 3 rows !

Select from dual return 3 rows !

2005-11-08       - By Rudy Zung

Reply:     1     2     3     4     5     6     7     8     9     10     >>  

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>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
<DIV><SPAN class=509160818-08112005><FONT face=Arial color=#0000ff
size=2>...Rudy</FONT></SPAN></DIV>
<DIV><SPAN class=509160818-08112005></SPAN>&nbsp;</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>&nbsp;</DIV>
     <DIV>On a 9.2.0.1.0 database I get the following result:</DIV>
     <DIV>&nbsp;</DIV>
     <DIV><A href="mailto:system@(protected)">system@(protected)</A>&gt; 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.&nbsp; Anyone seen
     this behaviour ?</DIV>
     <DIV>&nbsp;</DIV>
     <DIV>Thanks, Frank</DIV>
     <DIV>&nbsp;</DIV>
     <DIV>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE></DIV></BLOCKQUOTE></BODY><
/HTML>