INSERT INTO table (field1, field2) VALUES (1, 2), (3, 4), (5, 6), (7,
8);

That would insert 4 rows first row with field1=1, field2=2, second
field1=3, field2=4, etc.

This is documented on the INSERT Syntax page of the manual, but it may
be kind of hard to read for a beginner as it just says VALUES({expr |
DEFAULT},...),(...),...

On Thu, 2005-03-31 at 11:46 -0800, Chris W. Parker wrote:
> Hello,
> 
> 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.
> 
> 
> 
> Thanks,
> Chris.
> 
-- 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to