so now using cursor I want to insert 10,000 rows into 'test' table with same values. As"id" is the identity
column it will generate Id'd automatically.
If you like what you see please click the big 'Was this article helpful?' button at the the bottom.
Good luck.
Jim
gaurav sharma
ASKER
Hey jimThanks for the reply and yes it was intended to do using cursor.. and also I have to insert this 10000 rows for an existing table lets say I have to insert it from 5000( it has already 5000 rows in it)
Anthony Perkins
Is there some reason you want to do it in a loop? Why not do it with a single INSERT statement?
Why do you need a cursor when you can do it in one shot INSERT?
Jim Horn
Curiosity overwhelms me ...
1.
Why did you accept the one line comment you did, which is essentially a copy of an earlier comment, and not any of the more detailed solutions provided?
2.
Also, why are you asking another question inside a question that you've already selected an answer?
If you like what you see please click the big 'Was this article helpful?' button at the the bottom.
Good luck.
Jim