Insert series/sequence of numbers

  • Follow


I have a mysql database where I want to bulk insert a series of
numbers.

Is there a way to insert 1000 records (with one sql statement) where a
field called fld_listnum starts at 2223 and increments up to 3223?

0
Reply tdmailbox (42) 4/12/2007 2:08:52 PM

> Is there a way to insert 1000 records (with one sql statement) where a
> field called fld_listnum starts at 2223 and increments up to 3223?
> 

Theoretically: yes.

In practice: I think you will run out of command buffer space on a lot 
of servers, unless you specifically configure them with a large command 
buffer. Why must it be one statement? If you want the action to be 
atomic, you can do it in a transaction.

Best regards
0
Reply Dikkie 4/13/2007 5:41:49 PM


1 Replies
203 Views

(page loaded in 0.063 seconds)


Reply: