is this possible in mySQL -


i want add 100 rows in single insert, populating each field next in series of numbers (and string equivalents).

in other words, along these lines (mynumber varchar, myorder int):

insert mytable (mynumber, myorder) select "0"-"99", select 1-100

i have feeling can't done, thought i'd ask.

you should able without creating whole new table... long have table many records hope add, if there no bearing on content... can mysql query variables..

insert yourtable ( yoursequence, yourstringversion, field3 )    ( select             @seq:= @seq+1 yoursequence,            convert( @seq, char(8) ) yourstringversion,            "other defaults" field3                     (select @seq := 1) vars,             sometablewithatleast100records limit 100 ) justtoadd 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -