Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: select * from dual in MOUNTED database returns 4 columns (one row)
I can't remember when it came in, but when the database is not open, select * from dual is implemented by
select * from x$dual;
It's been around for AGES, and I can't think why all the stuff in standard.sql (such as the pl/sql USER, or UID calls) doesn't use it instead of incurring the logical I/O of using the proper DUAL table.
-- Jonathan Lewis http://www.jlcomp.demon.co.uk Next Seminars UK July / Sept Australia July / August Malaysia September USA (MI) November http://www.jlcomp.demon.co.uk/seminar.html Richard Foote wrote in message ...Received on Tue Jul 09 2002 - 02:47:10 CDT
>Hi Vsevolod,
>
>I must admit I've never tried to select from dual before with an unopened
>database so I'm not sure what you are actually accessing (I suspect some
>internal dual like object). What I do know is that you are not accessing
the
>dual table/synonym as this is only accessible with an open database so I
>would strongly suspect they are not one and the same.
>
>Regards
>
>Richard
>"Vsevolod Afanassiev" <vafanassiev_at_aapt.com.au> wrote in message
>news:4f7d504c.0207082214.506816ea_at_posting.google.com...
>> If a database is mounted (not opened), then
>>
>> select * from dual
>>
>> returns 4 columns (one row).
>> However, when the database is opened,
>>
>> select * from dual
>>
>> returns one column only.
>>
>> I checked DBA_OBJECTS - there are only two objects with name DUAL,
>> both in SYS schema, table and synonym.
>>
>> Thanks,
>> Sev
>
>
![]() |
![]() |