Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: multirow inserts
Just add
from dual
everywhere
Dual is a dummy table containing one single byte. It was specifically
designed from the start to cope with this kind of situation.
In the past everyone was printing like
select chr(10)||chr(13)||chr(12)
from dual!
Hth,
Sybrand Bakker, Oracle DBA
huh <huhhy_at_rocketmail.com> wrote in message
news:7l7i4q$2s53$1_at_ns.felk.cvut.cz...
> Hi,
>
> I'd like to know whether it is possible returning
> the resultset (of constant values) without
> accessing a table.
>
> E.g.:
>
> select 'row1', 1, 13.6, 'AAAA'
> union all
> select 'row2', 7, 0.2, 'FFFF'
> union all
> select 'row3', 5, 7.3, 'xttU';
>
> All values are constant so I see
> no reason for necessity to access
> any particular table. However the
> statement above is invalid.
>
> My intention is to insert data to my
> table using the single (multirow) statement
> e.g.:
>
> insert into MyTable (col1, ... col2)
> <multirow select>;
>
> Is there another way?
>
> TIA
>
> --
> Thank you for keeping >anti-spam< habit:
> not including my address in your reply.
>
>
>
Received on Mon Jun 28 1999 - 12:09:16 CDT