From: Dan Nelson Date: March 31 2005 8:01pm Subject: Re: How does a multi-row INSERT work? List-Archive: http://lists.mysql.com/mysql/181978 Message-Id: <20050331200145.GA17405@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (Mar 31), Chris W. Parker said: > I searched the archives, looked through the manual, and searched > google for info on how to actually perform a multi-row INSERT but > didn't find an answer. > > Would someone please show me the syntax for this please? > > I could just do a loop and INSERT the data that way but according to the > manual, a multi-row INSERT is faster. The syntax is described in the manual, but not with an explicit example. One of the user comments gives an exaple. http://dev.mysql.com/doc/mysql/en/insert.html INSERT INTO mytable (f1,f2,f3) VALUES (1,2,3),(4,5,6),(7,8,9); will insert three rows. Just tack as many ,(...) clauses on the end as you want. -- Dan Nelson dnelson@stripped