On Sep 19, 12:30 pm, "Michael Moore" <
michaeljmo...@gmail.com> wrote:
> I think that even if you do insert additional rows, you will only get one
> row when you select from it. Oracle does some special things with DUAL. It's
> not like a normal table.Mike
>
> On Fri, Sep 19, 2008 at 7:46 AM, Darlei Soares
> <
darlei.manches...@gmail.com>wrote:
>
>
>
>
>
> > Rob Wolf is right, is so bad insert values in dual, i use the dual
> > table for calcs, exemple
>
> > select (85/753)*5 from dual
>
> > of for me to found the sysdate, is so bizarre insert values in dual
>
> > 2008/9/19 Rob Wolfe <
rob.wo...@oraclegeeks.com>:
>
> > > You CAN, but what possible reason could you have that would possess you
> > to
> > > want to do such a bizarre thing?
>
> > > I am serious. This is just a VERY BAD IDEA and if anyone that worked for
> > > me was suggesting to me that they wanted to do it I would have to have a
> > > long think about their judgement.
>
> > > Rob
>
> > > On Fri, September 19, 2008 09:58, deepak sethi wrote:
> > >> Hi Karthi,
> > >> yes we can insert value into dual table
> > >> There is only one column dummy with varchar2 data type and length only
> > one
> > >> But we have to log in as sys (as SYSDBA)
>
> > >> Regards
> > >> Deepak
>
> > >> On Fri, Sep 19, 2008 at 6:28 AM, karthi keyan <
karthi...@gmail.com>
> > wrote:
>
> > >>> Can we insert value into DUAL table?
>
> > >>> Regards,
> > >>> Karthi
>
> > >> --
> > >> Deepak Sethi
> > >> India- Hide quoted text -
>
> - Show quoted text -
In 10g and later releases this is true, although this doesn't make
doing so a good idea. In 9i and earlier releases inserts into DUAL
are visible and can seriously affect database functionality.
********** DO NOT TRY THIS -- FOR ILLUSTRATIVE PURPOSES ONLY
**********
Database version 10.2.0.3.0
SQL> insert into dual values ('Z');
1 row created.
SQL> commit;
Commit complete.
SQL> select count(*) -- huh?!? what gives?!?
2 from dual;
COUNT(*)
----------
1
SQL> select * from dual; -- now, that's weird...
D
-
X
SQL> delete from dual -- proves record exists, it just can't be seen
2 where dummy = 'Z'
3 /
1 row deleted.
SQL> commit;
Commit complete.
SQL> delete from dual -- record no longer exists, try to delete it
anyway
2 where dummy = 'Z'
3 /
0 rows deleted.
SQL>
Oracle has, indeed, performed magic with DUAL in 10g and later
releases to keep fat fingers from ruining its functionality.
Unfortunately in 9iR2 and earlier versions such actions can seriously
affect applications and Oracle base functionality.
David Fitzjarrell