Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 query?????????

Author  Topic 

samsun125
Yak Posting Veteran

63 Posts

Posted - 2009-02-06 : 00:48:16
Hi all,

I have one query , in my table consist of 3 columns.

requirement is need to insert 100,000 records.

insert into tblemp(empid,empname,sal)values (1,'aa'1000)--using this
query i can insert only one record at a time. but i want insert
100,000 records at a time . is it possible.

at a time i want to insert 100,000 records ,is it possible.


if any body knows please give me reply.

Thanks & Regards
Rama

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-02-06 : 00:53:36
Yes it is possible

insert into table
select ------ union all
select ------ union all
select ------ union all
select ------
Go to Top of Page

Nageswar9
Aged Yak Warrior

600 Posts

Posted - 2009-02-06 : 00:55:10
or,

take the insert script for table and run with newtable
Go to Top of Page

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-02-06 : 00:56:27
is the records are in any other table
then use this
insert into targettablename
select col1,col2,col3 from tablename

r write a sp with parameters for this and call the sp with required values in ur front end
Go to Top of Page
   

- Advertisement -