Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Q: multirow inserts
Here's a sql statement that will work:
select 'row1', 1, 13.6, 'AAAA' from dual union all select 'row2', 7, .02, 'FFFF' from dual union all select 'row3', 5, 7.3, 'xttu' from dual;
Hope that helps,
Cindy
huh wrote:
> 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 - 13:11:26 CDT
![]() |
![]() |