Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL sequence Help Please !
A copy of this was sent to "Mujahid Hamid" <mujahid_at_pharmco.demon.co.uk>
(if that email address didn't require changing)
On Wed, 24 Jun 1998 20:31:34 +0100, you wrote:
>Hi All,
>
>How can insert values of 1 to 100 into a empty table from a sequence without
>using a cursor.
>
>Is there a way I can insert these vales by simply one or two commands.
>
>Thanks in advance
>
>Muji
>
>
>
assuming all_objects has more then 100 objects in it (safe assumption) then:
insert into some_table ( some_column )
select some_seq.nextval from all_objects where rownum <= 100;
>
Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA
http://govt.us.oracle.com/ -- downloadable utilities
Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Wed Jun 24 1998 - 20:23:36 CDT
![]() |
![]() |