gaurav sharma
asked on
SQL insert statement
I have a table 'test' with columns
Id, name, notes, definition, url, created_on updated_on
6232 samxx xxx xxx xxx xxx xxx
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.
Id, name, notes, definition, url, created_on updated_on
6232 samxx xxx xxx xxx xxx xxx
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.
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)
Is there some reason you want to do it in a loop? Why not do it with a single INSERT statement?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Why do you need a cursor when you can do it in one shot INSERT?
Curiosity overwhelms me ...
If you like what you see please click the big 'Was this article helpful?' button at the the bottom.
Good luck.
Jim