List:General Discussion« Previous MessageNext Message »
From:Jonathan Wright Date:March 31 2005 8:03pm
Subject:Re: How does a multi-row INSERT work?
View as plain text  
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.

I think you're looking for something like

INSERT INTO table [ (x, y, z) ] VALUES (a, b, c),
                                        (d, e, f),
                                        (h, i, j);

-- 
Jonathan Wright <mail at djnauk dot co dot uk>
   Life has no meaning unless we can enjoy what we've been given
--
Running on Gentoo Linux
   (2.6.10-gentoo-r7-djnauk-b03 i686 AMD Athlon(tm) XP 2100+ GNU/Linux)
Thread
How does a multi-row INSERT work?Chris W. Parker31 Mar
  • Re: How does a multi-row INSERT work?Jonathan Wright31 Mar
  • Re: How does a multi-row INSERT work?Dan Nelson31 Mar
    • Re: How does a multi-row INSERT work?SGreen31 Mar
  • Re: How does a multi-row INSERT work?John McCaskey31 Mar
  • Re: How does a multi-row INSERT work?Rhino1 Apr
  • Re: How does a multi-row INSERT work?Gabriel PREDA1 Apr
RE: How does a multi-row INSERT work?Chris W. Parker31 Mar
Re: How does a multi-row INSERT work?beacker31 Mar