MySQL multi insert
Posted October 29, 2007
on:- In: SQL
- Leave a Comment
I really wish I’d known this a long, long time ago:
insert into `mytable` (fname, lname, address) values ("john", "doe", "123 some st"), ("jane", "doe", "456 other st")
This wee gem allows an application to add multiple rows to a table in one simple query.
Say goodbye to those processor intensive loops…
Leave a comment