Re: How does a multi-row INSERT work?

2005-04-01 Thread Gabriel PREDA
Ok. I believe you got your answer... for the syntax... I just want to add that this is faster because... using this you only modify the index file once. Lets see for: INSERT INTO x VALUES (a,b); INSERT INTO x VALUES (c,d); The server does: open table INSERT INTO x VALUES (a,b);

Re: How does a multi-row INSERT work?

2005-03-31 Thread Jonathan Wright
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

Re: How does a multi-row INSERT work?

2005-03-31 Thread Dan Nelson
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

Re: How does a multi-row INSERT work?

2005-03-31 Thread John McCaskey
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

RE: How does a multi-row INSERT work?

2005-03-31 Thread Chris W. Parker
John McCaskey mailto:[EMAIL PROTECTED] on Thursday, March 31, 2005 12:04 PM said: 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},...),(...),... Oooh... In fact I did look through those

Re: How does a multi-row INSERT work?

2005-03-31 Thread SGreen
Dan Nelson [EMAIL PROTECTED] wrote on 03/31/2005 03:01:45 PM: 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

Re: How does a multi-row INSERT work?

2005-03-31 Thread beacker
Chris W. Parker writes: 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. The basic syntax is to separate the (...) with commas (,) ala: create table table1 (sku int, title varchar (20));

Re: How does a multi-row INSERT work?

2005-03-31 Thread Rhino
There are two forms of multi-row insert. Here is a script that illustrates both: use tmp; drop table if exists target; create table if not exists target (id smallint not null, name char(10) not null,