Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Sql code help

Re: Sql code help

From: Giannis Konstantaras <manta1900_at_aes.gr>
Date: Mon, 5 Feb 2001 12:29:59 +0200
Message-ID: <95lv2f$81e$1@usenet.otenet.gr>

Use :

insert into <table> as select ......

If you have the data into a table then :

insert into <destination_table> as select * from <source_table>

If you want to insert the "same" record into the table then:

insert into <destination_table> as select my_seq.nextval,'my string',1 from <any_table_with_more rows>
where rownum<=times_to_insert

I hope that helps

Have a nice code.
JK

"Grant Collins" <collinz_at_clara.co.uk> wrote in message news:Fydf6.42190$W94.3689027_at_nnrp4.clara.net...
> Hi,
>
> Can anyone help me? I am doing a project using sql scripts. I am trying
 to
> write a script that will insert data a number of times into a table.
 Instead
> of just once at a time. Can anyone help me with this?
>
> Is there anyother way of putting data into table instead of the
> insert into <tablename> values (....);?
>
> Many thanks
>
> Grant
> collinz_at_clara.co.uk
>
>
Received on Mon Feb 05 2001 - 04:29:59 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US