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);
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
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 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
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
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
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));
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,